Skip to content

Commit

Permalink
feat(aurelia): detect router on successive setRoot calls
Browse files Browse the repository at this point in the history
Closes #212
  • Loading branch information
EisenbergEffect committed Jan 5, 2016
1 parent db62269 commit 0f83b9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/aurelia.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ export class Aurelia {
let engine;
let instruction = {};

if (this.root && this.root.viewModel && this.root.viewModel.router) {
this.root.viewModel.router.deactivate();
this.root.viewModel.router.reset();
}

this._configureHost(applicationHost);

engine = this.container.get(TemplatingEngine);
Expand Down

0 comments on commit 0f83b9b

Please sign in to comment.