From c5681bd4b1adf1d406f2235c2aef62bb6572d5d9 Mon Sep 17 00:00:00 2001 From: Lee Bannard Date: Fri, 6 Nov 2015 13:43:32 +0000 Subject: [PATCH] Restore location after devtools reset --- src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 81f052c..bd66956 100644 --- a/src/index.js +++ b/src/index.js @@ -15,7 +15,10 @@ function updatePath(path, noRouterUpdate) { // Reducer -const initialState = {}; +const initialState = typeof window === undefined ? {} : { + path: locationToString(window.location) +}; + function update(state=initialState, action) { if(action.type === UPDATE_PATH) { return Object.assign({}, state, {