state.js: fix prod mode! applyDelta must operate on new_state (#1613)

This commit is contained in:
Masen Furer 2023-08-17 13:35:11 -07:00 committed by GitHub
parent bb337be06c
commit efefa757a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ export const getToken = () => {
export const applyDelta = (state, delta) => {
const new_state = {...state}
for (const substate in delta) {
let s = state;
let s = new_state;
const path = substate.split(".").slice(1);
while (path.length > 0) {
s = s[path.shift()];