mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
style(tabs): fix if statement (#21891)
This commit is contained in:
@ -82,7 +82,7 @@ export class TabButton implements ComponentInterface, AnchorInterface {
|
|||||||
const dispatchedFrom = ev.target as HTMLElement;
|
const dispatchedFrom = ev.target as HTMLElement;
|
||||||
const parent = this.el.parentElement as EventTarget;
|
const parent = this.el.parentElement as EventTarget;
|
||||||
|
|
||||||
if ((ev.composedPath && ev.composedPath().includes(parent)) || dispatchedFrom && dispatchedFrom.contains(this.el)) {
|
if ((ev.composedPath && ev.composedPath().includes(parent)) || (dispatchedFrom && dispatchedFrom.contains(this.el))) {
|
||||||
this.selected = this.tab === ev.detail.tab;
|
this.selected = this.tab === ev.detail.tab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user