File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,21 @@ export class IntegrationMidiSrd extends StartupHookMixin(IntegrationBase) {
58
58
59
59
await ( this . constructor . _PS_CACHE_PACK [ packId ] ||= this . constructor . _pDoCachePack ( { packId} ) ) ;
60
60
61
- const cacheDoc = this . constructor . _PACK_CACHE [ packId ] ?. [ this . constructor . _getCacheLookupName ( ent ) ] ;
61
+ const cacheDoc = this . constructor . _getCacheLookupNames ( { ent} )
62
+ . map ( lookupName => this . constructor . _PACK_CACHE [ packId ] ?. [ lookupName ] )
63
+ . find ( Boolean ) ;
62
64
if ( ! cacheDoc ) return null ;
63
65
64
66
return this . _getAddonData ( { doc : cacheDoc } ) ;
65
67
}
66
68
69
+ static _getCacheLookupNames ( { ent} ) {
70
+ return [
71
+ this . _getCacheLookupName ( ent ) ,
72
+ ( typeof ent . srd !== "string" ) ? null : this . _getCacheLookupName ( { name : ent . srd , source : ent . source } ) ,
73
+ ] . filter ( Boolean ) ;
74
+ }
75
+
67
76
static _getCacheLookupName ( { name, source} ) {
68
77
return [ name , source ] . map ( str => str . slugify ( { strict : true } ) ) . join ( "__" ) ;
69
78
}
You can’t perform that action at this time.
0 commit comments