fix(editor): Allow $secrets to resolve on credentials (#10093)

This commit is contained in:
Iván Ovejero
2024-07-19 12:00:07 +02:00
committed by GitHub
parent dd54390b0a
commit bf57f38d1c
4 changed files with 43 additions and 3 deletions

View File

@@ -293,14 +293,13 @@ export const useExpressionEditor = ({
// e.g. credential modal
result.resolved = Expression.resolveWithoutWorkflow(resolvable, toValue(additionalData));
} else {
let opts;
let opts: Record<string, unknown> = { additionalKeys: toValue(additionalData) };
if (ndvStore.isInputParentOfActiveNode) {
opts = {
targetItem: target ?? undefined,
inputNodeName: ndvStore.ndvInputNodeName,
inputRunIndex: ndvStore.ndvInputRunIndex,
inputBranchIndex: ndvStore.ndvInputBranchIndex,
additionalKeys: toValue(additionalData),
};
}
result.resolved = workflowHelpers.resolveExpression('=' + resolvable, undefined, opts);