Fix for no key issue

Now if location has no key, it is assumed that history hasn't updated
This commit is contained in:
Berkeley Martinez
2016-01-09 18:38:15 -08:00
parent f72cd3c986
commit e923513cea
2 changed files with 2 additions and 4 deletions

View File

@ -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;

View File

@ -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$