1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fix for settings.set subsequent updates

By cloning the value the assert.deepEqual will now fail even for subsequent updates of the value without restarting Node-RED
This commit is contained in:
Sam Machin 2020-05-31 13:44:31 +01:00 committed by GitHub
parent bcf1d986a4
commit a8d8540346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ var persistentSettings = {
throw new Error(log._("settings.not-available")); throw new Error(log._("settings.not-available"));
} }
var current = globalSettings[prop]; var current = globalSettings[prop];
globalSettings[prop] = value; globalSettings[prop] = clone(value);
try { try {
assert.deepEqual(current,value); assert.deepEqual(current,value);
return when.resolve(); return when.resolve();