web: fix options ducks

This commit is contained in:
Maximilian Hils 2021-06-25 13:08:27 +02:00
parent 4a8870a19e
commit e8fd816b97

View File

@ -17,7 +17,7 @@ const reducer: Reducer<OptionsState> = (state = defaultState, action) => {
case RECEIVE: case RECEIVE:
let s = <OptionsState>{}; let s = <OptionsState>{};
// @ts-ignore // @ts-ignore
for (const [name, value] of Object.entries(action.data)) { for (const [name, {value}] of Object.entries(action.data)) {
s[name] = value s[name] = value
} }
return s; return s;
@ -25,7 +25,7 @@ const reducer: Reducer<OptionsState> = (state = defaultState, action) => {
case UPDATE: case UPDATE:
let s2 = {...state} let s2 = {...state}
// @ts-ignore // @ts-ignore
for (const [name, value] of Object.entries(action.data)) { for (const [name, {value}] of Object.entries(action.data)) {
s2[name] = value s2[name] = value
} }
return s2 return s2