Skip to content

Commit

Permalink
Handle the initial URL just before subscribing to the store.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Jun 16, 2016
1 parent fbb6d39 commit e3eec24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/ui/configs/handle_routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ export function handleInitialUrl(actions, location) {
}

export default function ({ reduxStore }, actions) {
// handle initial URL
handleInitialUrl(actions, window.location);

// subscribe to reduxStore and change the URL
reduxStore.subscribe(() => changeUrl(reduxStore));
changeUrl(reduxStore);

// handle initial URL
handleInitialUrl(actions, window.location);

// handle back button
window.onpopstate = () => {
config.insidePopState = true;
Expand Down

0 comments on commit e3eec24

Please sign in to comment.