Prevented errors from crashing archive restoration

This commit is contained in:
Stefan Zermatten
2022-03-05 16:24:42 +02:00
parent 2442ae4fa0
commit a19e7d0514

View File

@@ -22,7 +22,12 @@ function cleanAt1(archive){
archive.properties.map(prop => {
const schema = CreatureProperties.simpleSchema(prop);
const cleanProp = schema.clean(prop);
schema.validate(cleanProp);
try {
schema.validate(cleanProp);
} catch (e){
console.warn('Prop did not pass schema validation');
console.warn(e);
}
return cleanProp;
});
}