lib(api/assets): skip if asset index faulty
This commit is contained in:
parent
3ed0f777a0
commit
bf21e98c5b
2 changed files with 5 additions and 1 deletions
|
|
@ -101,7 +101,8 @@ const config = {
|
|||
"transform-named-capturing-groups-regex",
|
||||
"transform-nullish-coalescing-operator",
|
||||
"transform-object-rest-spread",
|
||||
"transform-optional-chaining"
|
||||
"transform-optional-chaining",
|
||||
"transform-logical-assignment-operators"
|
||||
]
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ export const assetsMap: Record<string, Asset> = new Proxy<any>({}, {
|
|||
const assetIndex = requireModule(Number(id));
|
||||
const assetDefinition = assetsModule.getAssetByID(assetIndex);
|
||||
|
||||
// TODO: we shouldn't need this, this should never happen (unreproducible)
|
||||
if (!assetDefinition) continue;
|
||||
|
||||
assetDefinition.index ??= assetDefinition.id ??= assetIndex;
|
||||
assetDefinition.moduleId ??= id;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue