diff --git a/client/app/scripts/utils/router-utils.js b/client/app/scripts/utils/router-utils.js index 35dbae03bf..66ba020778 100644 --- a/client/app/scripts/utils/router-utils.js +++ b/client/app/scripts/utils/router-utils.js @@ -98,7 +98,7 @@ export function getRouter(dispatch, initialState) { if (storageState) { window.location.hash = `!/state/${storageState}`; const parsedState = JSON.parse(decodeURL(storageState)); - mergedState = Object.assign(initialState, parsedState); + mergedState = { ...initialState, ...parsedState }; } page('/', () => { diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index f7ab99c5b4..90423118c6 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -363,7 +363,10 @@ export function teardownWebsockets() { if (socket) { socket.onerror = null; socket.onclose = null; + socket.onmessage = null; + socket.onopen = null; socket.close(); + socket = null; currentOptions = null; } }