Fixes loading of viewState from localStorage into URL

Needed another serialization to avoid "[Object object]" in the url.
This commit is contained in:
Simon Howe
2017-03-28 14:53:35 +02:00
parent b2f06a63ee
commit 2c61635347

View File

@@ -119,7 +119,7 @@ export function getRouter(dispatch, initialState) {
} else {
const mergedState = Object.assign(initialState, parsedState);
// push storage state to URL
window.location.hash = `!/state/${mergedState}`;
window.location.hash = `!/state/${JSON.stringify(mergedState)}`;
dispatch(route(mergedState));
}
} else {