fix(editor): Fix expression preview when previous node is selected (#9140)

This commit is contained in:
Elias Meire
2024-04-19 10:07:00 +02:00
committed by GitHub
parent a3eea3ac5e
commit 85780eade5
2 changed files with 39 additions and 6 deletions

View File

@@ -83,12 +83,18 @@ const hint = computed(() => {
let result: Result<unknown, Error>;
try {
const resolvedValue = resolveExpression(value, undefined, {
targetItem: ndvStore.hoveringItem ?? undefined,
inputNodeName: ndvStore.ndvInputNodeName,
inputRunIndex: ndvStore.ndvInputRunIndex,
inputBranchIndex: ndvStore.ndvInputBranchIndex,
}) as unknown;
const resolvedValue = resolveExpression(
value,
undefined,
ndvStore.isInputParentOfActiveNode
? {
targetItem: ndvStore.hoveringItem ?? undefined,
inputNodeName: ndvStore.ndvInputNodeName,
inputRunIndex: ndvStore.ndvInputRunIndex,
inputBranchIndex: ndvStore.ndvInputBranchIndex,
}
: {},
) as unknown;
result = { ok: true, result: resolvedValue };
} catch (error) {