Skip to content

Commit 09beb9b

Browse files
Fix null values in asset cache for ESM scripts causing error (#8221)
* Fix null values in asset cache for ESM scripts causing error * Update src/framework/asset/asset-registry.js --------- Co-authored-by: Martin Valigursky <[email protected]>
1 parent 8c888a3 commit 09beb9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/framework/asset/asset-registry.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,10 @@ class AssetRegistry extends EventHandler {
466466
// remove old element
467467
document.head.removeChild(handler._cache[asset.id]);
468468
}
469-
handler._cache[asset.id] = extra;
469+
// prevents setting a null value in cache for esm scripts
470+
if (extra) {
471+
handler._cache[asset.id] = extra;
472+
}
470473
}
471474

472475
_opened(resource);

0 commit comments

Comments
 (0)