Skip to content

Commit

Permalink
fix(TransitionManager): Update url even when the Transition is ignored.
Browse files Browse the repository at this point in the history
Closes #2723
  • Loading branch information
christopherthielen committed May 12, 2016
1 parent 8742511 commit f9c3e3c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/state/hooks/transitionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ export class TransitionManager {
// Handle redirect and abort
if (error instanceof Rejection) {
if (error.type === RejectType.IGNORED) {
// Update $stateParmas/$state.params/$location.url if transition ignored, but dynamic params have changed.
let dynamic = $state.$current.parameters().filter(prop('dynamic'));
if (!Param.equals(dynamic, $state.params, transition.params())) {
this.updateUrl();
}
this.$urlRouter.update();
return $state.current;
}

Expand All @@ -104,7 +100,6 @@ export class TransitionManager {
let transition = this.transition;
let {$urlRouter, $state} = this;
let options = transition.options();
var toState = transition.$to();

if (options.location && $state.$current.navigable) {
$urlRouter.push($state.$current.navigable.url, $state.params, { replace: options.location === 'replace' });
Expand Down

0 comments on commit f9c3e3c

Please sign in to comment.