Fixed more failing tests to match nested sets
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties';
|
||||
|
||||
export default function cleanProp(prop) {
|
||||
if (!prop.root) {
|
||||
prop.root = { collection: 'creatures', id: 'testCreature' }
|
||||
}
|
||||
let schema = CreatureProperties.simpleSchema(prop);
|
||||
return schema.clean(prop);
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
export default function findAncestorByType(prop, type, propsById){
|
||||
if (!prop || !prop.ancestors) return;
|
||||
let ancestor;
|
||||
for (let i = prop.ancestors.length - 1; i >= 0; i--){
|
||||
ancestor = propsById[prop.ancestors[i].id];
|
||||
if (ancestor && ancestor.type === type){
|
||||
return ancestor;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user