Fixed more failing tests to match nested sets
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import findAncestorByType from '/imports/api/engine/computation/utility/findAncestorByType.js';
|
||||
import { traverse } from '/imports/parser/resolve.js';
|
||||
|
||||
export default function linkCalculationDependencies(dependencyGraph, prop, { propsById }) {
|
||||
@@ -57,3 +56,14 @@ function getAncestorProp(type, memo, prop, propsById) {
|
||||
return ancestorProp;
|
||||
}
|
||||
}
|
||||
|
||||
function findAncestorByType(prop, type, propsById) {
|
||||
if (!prop || !prop.parentId) return;
|
||||
let parentProp = prop;
|
||||
while (parentProp) {
|
||||
parentProp = propsById[parentProp.parentId];
|
||||
if (parentProp?.type === type) {
|
||||
return parentProp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user