Skip to content

Commit

Permalink
Merge pull request aurelia#406 from Roustalski/feature/publish-router…
Browse files Browse the repository at this point in the history
…-inner-resolve

Publishes an inner instruction resolve
  • Loading branch information
EisenbergEffect authored Jan 22, 2017
2 parents 90a4b1b + 59ca6ad commit b1282b7
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:child:complete', eventArgs);
}

return result;
Expand Down

0 comments on commit b1282b7

Please sign in to comment.