mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(nav): make call to setPages return the promise so if it rejects it doesn't get lost
This commit is contained in:
@@ -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
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user