fix: allow null for the local entry in the myservers cfg

This commit is contained in:
Eli Bosley
2023-09-11 14:51:38 -04:00
parent 7194a44822
commit c96190447e

View File

@@ -38,14 +38,14 @@ export const getWriteableConfig = <T extends ConfigType>(
...(api.extraOrigins ? { extraOrigins: api.extraOrigins } : {}),
},
local: {
...(local['2Fa'] === 'yes' ? { '2Fa': local['2Fa'] } : {}),
...(local.showT2Fa === 'yes' ? { showT2Fa: local.showT2Fa } : {}),
...(local?.['2Fa'] === 'yes' ? { '2Fa': local['2Fa'] } : {}),
...(local?.showT2Fa === 'yes' ? { showT2Fa: local.showT2Fa } : {}),
},
notifier: {
apikey: notifier.apikey ?? initialState.notifier.apikey,
},
remote: {
...(remote['2Fa'] === 'yes' ? { '2Fa': remote['2Fa'] } : {}),
...(remote?.['2Fa'] === 'yes' ? { '2Fa': remote['2Fa'] } : {}),
wanaccess: remote.wanaccess ?? initialState.remote.wanaccess,
wanport: remote.wanport ?? initialState.remote.wanport,
...(remote.upnpEnabled ? { upnpEnabled: remote.upnpEnabled } : {}),