From 9acc946a4e191170c4a5ce598b2b81d1c83ded01 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sat, 9 Jan 2016 18:38:15 -0800 Subject: [PATCH] Fix for no key issue Now if location has no key, it is assumed that history hasn't updated --- client/history-saga.js | 2 +- client/index.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/history-saga.js b/client/history-saga.js index 25e65340b9..f73576d394 100644 --- a/client/history-saga.js +++ b/client/history-saga.js @@ -35,7 +35,7 @@ export default function historySaga( } // store location has changed, update history - if (location.key !== prevKey) { + if (!location.key || location.key !== prevKey) { isSyncing = true; history.transitionTo({ ...emptyLocation, ...location }); isSyncing = false; diff --git a/client/index.js b/client/index.js index ceaeb012ed..5089d27322 100644 --- a/client/index.js +++ b/client/index.js @@ -51,9 +51,7 @@ app$({ history, location: appLocation }) const routerState$ = appStore$ .map(({ location }) => location) - .distinctUntilChanged( - location => location && location.key ? location.key : location - ); + .filter(location => !!location); // set page title appStore$