Save editor settings in /settings/user

This commit is contained in:
Nick O'Leary
2017-12-05 10:20:13 +00:00
parent fff0b15ae5
commit 1b632894d3
2 changed files with 66 additions and 8 deletions

View File

@@ -197,7 +197,7 @@ RED.userSettings = (function() {
allSettings[opt.setting] = opt;
if (opt.onchange) {
var value = RED.settings.get(opt.setting);
if (value === null && opt.hasOwnProperty('default')) {
if ((value === null || value === undefined) && opt.hasOwnProperty('default')) {
value = opt.default;
RED.settings.set(opt.setting,value);
}