mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 02:10:59 +00:00
web: fix options ducks
This commit is contained in:
parent
4a8870a19e
commit
e8fd816b97
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user