mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Fix issue with IF&Switch node for undefined expressions #1099
This commit is contained in:
@@ -205,7 +205,7 @@ export class Expression {
|
||||
}
|
||||
|
||||
return returnData as NodeParameterValue[] | INodeParameters[];
|
||||
} else if (parameterValue === null) {
|
||||
} else if (parameterValue === null || parameterValue === undefined) {
|
||||
return parameterValue;
|
||||
} else {
|
||||
// Data is an object
|
||||
|
||||
@@ -383,7 +383,7 @@ export interface INodeExecuteFunctions {
|
||||
|
||||
|
||||
// The values a node property can have
|
||||
export type NodeParameterValue = string | number | boolean;
|
||||
export type NodeParameterValue = string | number | boolean | undefined | null;
|
||||
|
||||
export interface INodeParameters {
|
||||
// TODO: Later also has to be possible to add multiple ones with the name name. So array has to be possible
|
||||
|
||||
@@ -642,7 +642,7 @@ export function getNodeParameters(nodePropertiesArray: INodeProperties[], nodeVa
|
||||
}
|
||||
|
||||
// Itterate over all collections
|
||||
for (const itemName of Object.keys(propertyValues)) {
|
||||
for (const itemName of Object.keys(propertyValues || {})) {
|
||||
if (nodeProperties.typeOptions !== undefined && nodeProperties.typeOptions.multipleValues === true) {
|
||||
// Multiple can be set so will be an array
|
||||
|
||||
|
||||
@@ -380,8 +380,8 @@ export class Workflow {
|
||||
|
||||
const returnData: any = {}; // tslint:disable-line:no-any
|
||||
|
||||
for (const parameterName of Object.keys(parameterValue)) {
|
||||
returnData[parameterName] = this.renameNodeInExpressions(parameterValue[parameterName], currentName, newName);
|
||||
for (const parameterName of Object.keys(parameterValue || {})) {
|
||||
returnData[parameterName] = this.renameNodeInExpressions(parameterValue![parameterName], currentName, newName);
|
||||
}
|
||||
|
||||
return returnData;
|
||||
|
||||
Reference in New Issue
Block a user