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

Restore location after devtools reset #6

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down