mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Option to set null/undefined properties with setObjectProperty
This commit is contained in:
		| @@ -473,7 +473,7 @@ function setObjectProperty(msg,prop,value,createMissing) { | ||||
|     for (var i=0;i<length-1;i++) { | ||||
|         key = msgPropParts[i]; | ||||
|         if (typeof key === 'string' || (typeof key === 'number' && !Array.isArray(obj))) { | ||||
|             if (hasOwnProperty.call(obj, key)) { | ||||
|             if (hasOwnProperty.call(obj, key) && obj[key] != null) { | ||||
|                 if (length > 1 && ((typeof obj[key] !== "object" && typeof obj[key] !== "function") || obj[key] === null)) { | ||||
|                     // Break out early as we cannot create a property beneath | ||||
|                     // this type of value | ||||
|   | ||||
		Reference in New Issue
	
	Block a user