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:
Brian Soumakian
2017-04-17 09:46:11 -07:00
committed by Justin Willis
parent 786de79ad9
commit e423e082b6

View File

@@ -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);