From 365677006cc9f749a59ce5b5cf9b13d50dca8c0f Mon Sep 17 00:00:00 2001 From: Matthew Shao Date: Sun, 30 Apr 2017 22:40:58 +0800 Subject: [web] Export updateUrlFromStore and updateStoreFromUrl --- web/src/js/urlState.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/src/js/urlState.js') diff --git a/web/src/js/urlState.js b/web/src/js/urlState.js index fcad3de3..7802bdb8 100644 --- a/web/src/js/urlState.js +++ b/web/src/js/urlState.js @@ -15,7 +15,7 @@ const Query = { SHOW_EVENTLOG: "e" }; -function updateStoreFromUrl(store) { +export function updateStoreFromUrl(store) { const [path, query] = window.location.hash.substr(1).split("?", 2) const path_components = path.substr(1).split("/") @@ -50,7 +50,7 @@ function updateStoreFromUrl(store) { } } -function updateUrlFromStore(store) { +export function updateUrlFromStore(store) { const state = store.getState() let query = { [Query.SEARCH]: state.flows.filter, @@ -78,6 +78,6 @@ function updateUrlFromStore(store) { } export default function initialize(store) { - store.subscribe(() => updateUrlFromStore(store)) updateStoreFromUrl(store) + store.subscribe(() => updateUrlFromStore(store)) } -- cgit v1.2.3