mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 18:03:50 +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:
|
||||
let s = <OptionsState>{};
|
||||
// @ts-ignore
|
||||
for (const [name, value] of Object.entries(action.data)) {
|
||||
for (const [name, {value}] of Object.entries(action.data)) {
|
||||
s[name] = value
|
||||
}
|
||||
return s;
|
||||
@ -25,7 +25,7 @@ const reducer: Reducer<OptionsState> = (state = defaultState, action) => {
|
||||
case UPDATE:
|
||||
let s2 = {...state}
|
||||
// @ts-ignore
|
||||
for (const [name, value] of Object.entries(action.data)) {
|
||||
for (const [name, {value}] of Object.entries(action.data)) {
|
||||
s2[name] = value
|
||||
}
|
||||
return s2
|
||||
|
Loading…
Reference in New Issue
Block a user