Skip to content

Commit

Permalink
Publishes an inner instruction resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson, Russell committed Sep 20, 2016
1 parent 33b04b2 commit bf1f57c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ function processResult(instruction, result, instructionCount, router) {
function resolveInstruction(instruction, result, isInnerInstruction, router) {
instruction.resolve(result);

let eventArgs = { instruction, result };
if (!isInnerInstruction) {
router.isNavigating = false;
let eventArgs = { instruction, result };
let eventName;

if (result.output instanceof Error) {
Expand All @@ -216,6 +216,8 @@ function resolveInstruction(instruction, result, isInnerInstruction, router) {

router.events.publish(`router:navigation:${eventName}`, eventArgs);
router.events.publish('router:navigation:complete', eventArgs);
} else {
router.events.publish('router:navigation:innerInstruction:resolve', eventArgs);
}

return result;
Expand Down

0 comments on commit bf1f57c

Please sign in to comment.