Skip to content

Commit

Permalink
fix(nav): make call to setPages return the promise so if it rejects i…
Browse files Browse the repository at this point in the history
…t doesn't get lost
  • Loading branch information
danbucholtz committed Jul 26, 2017
1 parent 4596dbe commit de0f9d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/nav/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class Nav extends NavControllerBase implements AfterViewInit, RootNode, I

if (segment && (segment.component || segment.loadChildren)) {
return this._linker.initViews(segment).then(views => {
this.setPages(views, null, null);
return this.setPages(views, null, null);
});
} else if (this._root) {
// no segment match, so use the root property but don't set the url I guess
Expand All @@ -133,6 +133,7 @@ export class Nav extends NavControllerBase implements AfterViewInit, RootNode, I
get root(): any {
return this._root;
}

set root(page: any) {
this._root = page;

Expand Down

0 comments on commit de0f9d5

Please sign in to comment.