From 2c6163534764da35896a1b244fc6d02e3d879c93 Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Tue, 28 Mar 2017 14:53:35 +0200 Subject: [PATCH] Fixes loading of viewState from localStorage into URL Needed another serialization to avoid "[Object object]" in the url. --- client/app/scripts/utils/router-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/app/scripts/utils/router-utils.js b/client/app/scripts/utils/router-utils.js index b4d1c4536..ce35ca468 100644 --- a/client/app/scripts/utils/router-utils.js +++ b/client/app/scripts/utils/router-utils.js @@ -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 {