diff --git a/packages/node_modules/@node-red/runtime/lib/api/settings.js b/packages/node_modules/@node-red/runtime/lib/api/settings.js index e8ea36f04..0224c0ca6 100644 --- a/packages/node_modules/@node-red/runtime/lib/api/settings.js +++ b/packages/node_modules/@node-red/runtime/lib/api/settings.js @@ -36,7 +36,15 @@ function extend(target, source) { } else { // Object if (target.hasOwnProperty(keys[i])) { - target[keys[i]] = extend(target[keys[i]],value); + // Target property exists. Need to handle the case + // where the existing property is a string/number/boolean + // and is being replaced wholesale. + var targetType = typeof target[keys[i]]; + if (targetType === 'string' || targetType === 'number' || targetType === 'boolean') { + target[keys[i]] = value; + } else { + target[keys[i]] = extend(target[keys[i]],value); + } } else { target[keys[i]] = value; }