Skip to content

Commit 8586cc1

Browse files
committed
fix(navigation): update the URL if there are no children navs
1 parent 33be36d commit 8586cc1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/navigation/nav-controller-base.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ export class NavControllerBase extends Ion implements NavController {
752752
// it's safe to enable the app again
753753
this._app.setEnabled(true);
754754

755-
if (opts.updateUrl !== false) {
755+
if (!this.hasChildren() && opts.updateUrl !== false) {
756756
// notify deep linker of the nav change
757757
// if a direction was provided and should update url
758758
this._linker.navChange(opts.direction);
@@ -924,6 +924,10 @@ export class NavControllerBase extends Ion implements NavController {
924924
this._app.viewWillUnload.emit(view);
925925
}
926926

927+
hasChildren(): boolean {
928+
return this._children.length > 0;
929+
}
930+
927931
getActiveChildNav(): any {
928932
return this._children[this._children.length - 1];
929933
}

0 commit comments

Comments
 (0)