fix: Filter component - improve errors (#10456)

This commit is contained in:
Michael Kret
2024-08-19 19:01:33 +03:00
committed by GitHub
parent f784a4c95a
commit 61ac0c7775
10 changed files with 157 additions and 39 deletions

View File

@@ -0,0 +1,15 @@
import type { IExecuteFunctions } from 'n8n-workflow';
export const getTypeValidationStrictness = (version: number) => {
return `={{ ($nodeVersion < ${version} ? $parameter.options.looseTypeValidation : $parameter.looseTypeValidation) ? "loose" : "strict" }}`;
};
export const getTypeValidationParameter = (version: number) => {
return (context: IExecuteFunctions, itemIndex: number, option: boolean | undefined) => {
if (context.getNode().typeVersion < version) {
return option;
} else {
return context.getNodeParameter('looseTypeValidation', itemIndex, false) as boolean;
}
};
};