state.js: fix prod mode! applyDelta must operate on new_state (#1613)
This commit is contained in:
parent
bb337be06c
commit
efefa757a0
@ -76,7 +76,7 @@ export const getToken = () => {
|
|||||||
export const applyDelta = (state, delta) => {
|
export const applyDelta = (state, delta) => {
|
||||||
const new_state = {...state}
|
const new_state = {...state}
|
||||||
for (const substate in delta) {
|
for (const substate in delta) {
|
||||||
let s = state;
|
let s = new_state;
|
||||||
const path = substate.split(".").slice(1);
|
const path = substate.split(".").slice(1);
|
||||||
while (path.length > 0) {
|
while (path.length > 0) {
|
||||||
s = s[path.shift()];
|
s = s[path.shift()];
|
||||||
|
Loading…
Reference in New Issue
Block a user