mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix(IF Node): bug when null isn't considerate empty in isEmpty and isNotEmpty comparison
This commit is contained in:
parent
4810a4f58a
commit
0cdc2e9dc8
|
@ -346,13 +346,13 @@ export class If implements INodeType {
|
|||
notStartsWith: (value1: NodeParameterValue, value2: NodeParameterValue) =>
|
||||
!(value1 as string).startsWith(value2 as string),
|
||||
isEmpty: (value1: NodeParameterValue) =>
|
||||
[undefined, null, ''].includes(value1 as string) ||
|
||||
[undefined, null, '', NaN].includes(value1 as string) ||
|
||||
(typeof value1 === 'object' && value1 !== null
|
||||
? Object.entries(value1 as string).length === 0
|
||||
: false),
|
||||
isNotEmpty: (value1: NodeParameterValue) =>
|
||||
!(
|
||||
[undefined, null, ''].includes(value1 as string) ||
|
||||
[undefined, null, '', NaN].includes(value1 as string) ||
|
||||
(typeof value1 === 'object' && value1 !== null
|
||||
? Object.entries(value1 as string).length === 0
|
||||
: false)
|
||||
|
|
Loading…
Reference in a new issue