Fix for no key issue
Now if location has no key, it is assumed that history hasn't updatedpull/5960/head
parent
019a28a5cc
commit
9acc946a4e
|
@ -35,7 +35,7 @@ export default function historySaga(
|
||||||
}
|
}
|
||||||
|
|
||||||
// store location has changed, update history
|
// store location has changed, update history
|
||||||
if (location.key !== prevKey) {
|
if (!location.key || location.key !== prevKey) {
|
||||||
isSyncing = true;
|
isSyncing = true;
|
||||||
history.transitionTo({ ...emptyLocation, ...location });
|
history.transitionTo({ ...emptyLocation, ...location });
|
||||||
isSyncing = false;
|
isSyncing = false;
|
||||||
|
|
|
@ -51,9 +51,7 @@ app$({ history, location: appLocation })
|
||||||
|
|
||||||
const routerState$ = appStore$
|
const routerState$ = appStore$
|
||||||
.map(({ location }) => location)
|
.map(({ location }) => location)
|
||||||
.distinctUntilChanged(
|
.filter(location => !!location);
|
||||||
location => location && location.key ? location.key : location
|
|
||||||
);
|
|
||||||
|
|
||||||
// set page title
|
// set page title
|
||||||
appStore$
|
appStore$
|
||||||
|
|
Loading…
Reference in New Issue