From 6314d6ca5274a5cccf3a4ad165990faf5a490bdf Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Mon, 23 Aug 2021 15:31:13 -0400 Subject: [PATCH] fix: fix merging of settings state in settings context (#711) --- src/frontend/context/SettingsContext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/context/SettingsContext.js b/src/frontend/context/SettingsContext.js index 952294eff..5abbacffd 100644 --- a/src/frontend/context/SettingsContext.js +++ b/src/frontend/context/SettingsContext.js @@ -52,7 +52,7 @@ export const SettingsProvider = ({ children }: { children: React.Node }) => { const contextValue: SettingsContextType = React.useMemo(() => { // If we add any new properties to the settings state, they will be // undefined in a users' persisted state, so we merge in the defaults - const mergedState = merge({}, state, DEFAULT_SETTINGS); + const mergedState = merge({}, DEFAULT_SETTINGS, state); return [mergedState, setSettings]; }, [state, setSettings]);