Skip to content

Commit

Permalink
fix(router-store): don't navigate on NagivationStart (#1392)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver authored and brandonroberts committed Oct 31, 2018
1 parent 4cbb073 commit 19a7d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/router-store/src/router_store_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ export class StoreRouterConnectingModule {
}

private shouldDispatchRouterNavigation(): boolean {
if (this.lastEvent instanceof NavigationStart) return false;
if (!this.storeState[this.stateKey]) return true;
return !this.navigationTriggeredByDispatch;
}
Expand All @@ -282,6 +281,7 @@ export class StoreRouterConnectingModule {
return;
}
if (this.dispatchTriggeredByRouter) return;
if (this.lastEvent instanceof NavigationStart) return;

if (this.router.url !== this.storeState[this.stateKey].state.url) {
this.navigationTriggeredByDispatch = true;
Expand Down

0 comments on commit 19a7d06

Please sign in to comment.