logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
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:

Msrc/modules/serverSideConfig.js4++--
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) {