mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
fix(core): Handle item and items correctly in js task runner
This commit is contained in:
parent
0fdb79a270
commit
269879fe09
|
@ -62,6 +62,15 @@ describe('BuiltInsParser', () => {
|
|||
|
||||
expect(state).toEqual(new BuiltInsParserState({ needs$input: true }));
|
||||
});
|
||||
|
||||
test.each([['items'], ['item']])(
|
||||
'should mark input as needed when %s is used',
|
||||
(identifier) => {
|
||||
const state = parseAndExpectOk(`return ${identifier};`);
|
||||
|
||||
expect(state).toEqual(new BuiltInsParserState({ needs$input: true }));
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
describe('$(...)', () => {
|
||||
|
|
|
@ -131,6 +131,9 @@ export class BuiltInsParser {
|
|||
state.markExecutionAsNeeded();
|
||||
} else if (node.name === '$prevNode') {
|
||||
state.markPrevNodeAsNeeded();
|
||||
} else if (node.name === 'items' || node.name === 'item') {
|
||||
// item is deprecated but we still need to support it
|
||||
state.markInputAsNeeded();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue