Skip to content

Commit

Permalink
⚡ Updating expression resolving logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Sep 17, 2024
1 parent 29db847 commit 8aa94fc
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/editor-ui/src/composables/useWorkflowHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,20 @@ export function useWorkflowHelpers(options: { router: ReturnType<typeof useRoute
// Resolve the expression if it is one
let resolved;
try {
resolved = resolveExpression(value, nodeParameters);
let opts: Parameters<typeof resolveExpression>[2] = {
isForCredential: false,
};
const ndvStore = useNDVStore();
if (ndvStore.isInputParentOfActiveNode) {
opts = {
...opts,
targetItem: ndvStore.expressionTargetItem ?? undefined,
inputNodeName: ndvStore.ndvInputNodeName,
inputRunIndex: ndvStore.ndvInputRunIndex,
inputBranchIndex: ndvStore.ndvInputBranchIndex,
};
}
resolved = resolveExpression(value, undefined, opts);
} catch (error) {
resolved = `Error in expression: "${error.message}"`;
}
Expand Down

0 comments on commit 8aa94fc

Please sign in to comment.