fix(core): Opt-out from optimizations if $item is used (#12036)

This commit is contained in:
Tomi Turtiainen
2024-12-04 14:32:28 +02:00
committed by GitHub
parent 75ed749172
commit 872535a40c
2 changed files with 13 additions and 1 deletions

View File

@@ -125,6 +125,11 @@ export class BuiltInsParser {
private visitIdentifier = (node: Identifier, state: BuiltInsParserState) => {
if (node.name === '$env') {
state.markEnvAsNeeded();
} else if (node.name === '$item') {
// $item is legacy syntax that is basically an alias for WorkflowDataProxy
// and allows accessing any data. We need to support it for backwards
// compatibility, but we're not gonna implement any optimizations
state.markNeedsAllNodes();
} else if (
node.name === '$input' ||
node.name === '$json' ||