Skip to content

Commit

Permalink
Fix error introduced in 487c33d (when trying to fix aurelia#480)
Browse files Browse the repository at this point in the history
This causes aurelia#480 to re-appear until a better handling for cancellations exists
  • Loading branch information
rluba committed Jun 5, 2018
1 parent 5fcb6f4 commit 3db8a8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/navigation-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export function _buildNavigationPlan(instruction: NavigationInstruction, forceLi
childInstruction,
viewPortPlan.strategy === activationStrategy.invokeLifecycle)
.then(childPlan => {
if (childPlan instanceof Redirect) {
return Promise.reject(childPlan);
}
childInstruction.plan = childPlan;
});
});
Expand Down
3 changes: 3 additions & 0 deletions src/route-loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ function loadRoute(routeLoader: RouteLoader, navigationInstruction: NavigationIn

return _buildNavigationPlan(childInstruction)
.then((childPlan) => {
if (childPlan instanceof Redirect) {
return Promise.reject(childPlan);
}
childInstruction.plan = childPlan;
viewPortInstruction.childNavigationInstruction = childInstruction;

Expand Down

0 comments on commit 3db8a8c

Please sign in to comment.