commit: 8bb97fbfeb8f34c36aec96ee175d6eced49c1fb4
parent 3a5ad18aca6a7303e6f6b97dd3f0919d5532184c
Author: Henry Jameson <me@hjkos.com>
Date: Mon, 28 Feb 2022 18:01:41 +0200
fix settings behaving erratically and not updating properly
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/serverSideConfig.js b/src/modules/serverSideConfig.js
@@ -44,7 +44,7 @@ export const customAPIs = {
'blockNotificationsFromStrangers': 'updateNotificationSettings'
}
-export const defaultState = Object.fromEntries(Object.keys(settingsMapGet).map(key => [key, undefined]))
+export const defaultState = Object.fromEntries(Object.keys(settingsMapGet).map(key => [key, null]))
const serverSideConfig = {
state: { ...defaultState },
@@ -53,7 +53,7 @@ const serverSideConfig = {
set(state, name, value)
},
wipeServerSideOption (state, { name }) {
- set(state, name, undefined)
+ set(state, name, null)
},
// Set the settings based on their path location
setCurrentUser (state, user) {