Fixed error where dependency loops including classLevels break the sheet
This commit is contained in:
@@ -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}});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user