Ignore erroring modifiers when loading session

This commit is contained in:
Flashfyre 2024-01-01 12:32:03 -05:00
parent eae0d907c5
commit 2d1fabdc03
1 changed files with 14 additions and 9 deletions

View File

@ -32,6 +32,7 @@ export default class ModifierData {
if (!typeFunc) if (!typeFunc)
return null; return null;
try {
let type = typeFunc(); let type = typeFunc();
type.id = this.typeId; type.id = this.typeId;
type.generatorId = this.typeGeneratorId; type.generatorId = this.typeGeneratorId;
@ -45,5 +46,9 @@ export default class ModifierData {
ret.stackCount = ret.getMaxStackCount(scene); ret.stackCount = ret.getMaxStackCount(scene);
return ret; return ret;
} catch (err) {
console.error(err);
return null;
}
} }
} }