mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(tabs): invalid component comparison (#11084)
getComponent() returns a ViewController, so we must reference the component property when checking against the active component
This commit is contained in:
committed by
Justin Willis
parent
786de79ad9
commit
e423e082b6
@@ -511,7 +511,7 @@ export class Tabs extends Ion implements AfterViewInit, RootNode {
|
||||
});
|
||||
} else {
|
||||
getComponent(this._linker, tab.root).then(viewController => {
|
||||
if (viewController !== active.component) {
|
||||
if (viewController.component !== active.component) {
|
||||
// Otherwise, if the page we're on is not our real root
|
||||
// reset it to our default root type
|
||||
return tab.setRoot(tab.root);
|
||||
|
||||
Reference in New Issue
Block a user