Fixed error where dependency loops including classLevels break the sheet

This commit is contained in:
Stefan Zermatten
2022-02-26 13:06:00 +02:00
parent 59c69a46a8
commit 7ee4a22d77
9 changed files with 57 additions and 7 deletions

View File

@@ -0,0 +1,9 @@
import Creatures from '/imports/api/creature/creatures/Creatures.js';
export default function(creatureId, errors = []){
if (errors.length){
Creatures.update(creatureId, {$set: {computeErrors: errors}});
} else {
Creatures.update(creatureId, {$unset: {computeErrors: 1}});
}
}