diff options
author | hackademix | 2019-04-06 10:49:57 +0200 |
---|---|---|
committer | hackademix | 2019-04-06 10:49:57 +0200 |
commit | 949397847354aec83be5e2ed40b863d349ca0688 (patch) | |
tree | 4a41b474c7cd8110f1ba729c36807bfaae84489f /src | |
parent | db85a7cb01c70a7043fec911529fcb64a0d99eb3 (diff) | |
download | noscript-949397847354aec83be5e2ed40b863d349ca0688.tar.gz noscript-949397847354aec83be5e2ed40b863d349ca0688.tar.xz noscript-949397847354aec83be5e2ed40b863d349ca0688.zip |
Fixed resetting options works just once per session (defaults reference current settings) - issue #69.
Diffstat (limited to 'src')
-rw-r--r-- | src/bg/Settings.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bg/Settings.js b/src/bg/Settings.js index c0af149..28f880e 100644 --- a/src/bg/Settings.js +++ b/src/bg/Settings.js @@ -134,7 +134,7 @@ var Settings = { async storage => (settings[storage] || // changed or... settings[storage] === null // ... needs reset to default ) && await ns.save(settings[storage] - ? Object.assign(ns[storage], settings[storage]) : ns[storage] = ns.defaults[storage]) + ? Object.assign(ns[storage], settings[storage]) : ns[storage] = Object.assign({}, ns.defaults[storage])) )); if (ns.local.debug !== oldDebug) { await include("/lib/log.js"); |