fix(editor): Resolve expressions for grandparent nodes (#5859)
* fix(editor): Resolve expressions for grandparent nodes * test: add tests * test: add tests for bug * test: add todos * test: lintfix * test: add small waits * test: add linking tests * test: add test for branch mapping * test: update workflow values * test: comment out test * test: fix up tests with new values * chore: remove todos * test: add ticket number for broken test * test: refactor a bit * test: uncomment * test: fix mapping test * fix: lint issue * test: split tests * Revert "test: split tests" 0290d51d7c983320a718346ccb80fbad93894c6e * test: update mousedown * test: split up tests * test: fix test * test: fix test * test: make less flaky * test: make less flaky * test: enable teset
This commit is contained in:
@@ -170,16 +170,21 @@ export const expressionManager = mixins(workflowHelpers).extend({
|
||||
};
|
||||
|
||||
try {
|
||||
if (!useNDVStore().activeNode) {
|
||||
const ndvStore = useNDVStore();
|
||||
if (!ndvStore.activeNode) {
|
||||
// e.g. credential modal
|
||||
result.resolved = Expression.resolveWithoutWorkflow(resolvable);
|
||||
} else {
|
||||
result.resolved = this.resolveExpression('=' + resolvable, undefined, {
|
||||
targetItem: targetItem ?? undefined,
|
||||
inputNodeName: this.ndvStore.ndvInputNodeName,
|
||||
inputRunIndex: this.ndvStore.ndvInputRunIndex,
|
||||
inputBranchIndex: this.ndvStore.ndvInputBranchIndex,
|
||||
});
|
||||
let opts;
|
||||
if (ndvStore.isInputParentOfActiveNode) {
|
||||
opts = {
|
||||
targetItem: targetItem ?? undefined,
|
||||
inputNodeName: this.ndvStore.ndvInputNodeName,
|
||||
inputRunIndex: this.ndvStore.ndvInputRunIndex,
|
||||
inputBranchIndex: this.ndvStore.ndvInputBranchIndex,
|
||||
};
|
||||
}
|
||||
result.resolved = this.resolveExpression('=' + resolvable, undefined, opts);
|
||||
}
|
||||
} catch (error) {
|
||||
result.resolved = `[${error.message}]`;
|
||||
|
||||
Reference in New Issue
Block a user