mirror of https://github.com/node-red/node-red.git
Revert "Option to set null/undefined properties with setObjectProperty"
This reverts commit 92e40020be
.
pull/3675/head
parent
cd8d8aec60
commit
357430d7bb
|
@ -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) && obj[key] != null) {
|
||||
if (hasOwnProperty.call(obj, key)) {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue