From e3eec245826070fd806dade16d5910e1dae996b5 Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Thu, 16 Jun 2016 10:23:09 +0530 Subject: [PATCH] Handle the initial URL just before subscribing to the store. --- src/modules/ui/configs/handle_routing.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/ui/configs/handle_routing.js b/src/modules/ui/configs/handle_routing.js index 5a7fd6d841b7..a1c08a195f55 100755 --- a/src/modules/ui/configs/handle_routing.js +++ b/src/modules/ui/configs/handle_routing.js @@ -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;