Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Commit c5681bd

Browse files
committed
Restore location after devtools reset
1 parent 8780e56 commit c5681bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ function updatePath(path, noRouterUpdate) {
1515

1616
// Reducer
1717

18-
const initialState = {};
18+
const initialState = typeof window === undefined ? {} : {
19+
path: locationToString(window.location)
20+
};
21+
1922
function update(state=initialState, action) {
2023
if(action.type === UPDATE_PATH) {
2124
return Object.assign({}, state, {

0 commit comments

Comments
 (0)