Added more granular JS API exports

This commit is contained in:
jpellizzari
2017-03-08 10:54:56 -08:00
committed by Jordan Pellizzari
parent d775020794
commit 38d2b8ddff
8 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -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('/', () => {
@@ -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;
}
}