mirror of
https://github.com/material-components/material-web.git
synced 2024-08-17 09:30:27 +03:00
fix(tabs): use instanceof to check for a Tab
PiperOrigin-RevId: 562917297
This commit is contained in:
parent
29f1318293
commit
58497f13b2
@ -35,12 +35,6 @@ export class Tab extends LitElement {
|
||||
static override shadowRootOptions:
|
||||
ShadowRootInit = {mode: 'open', delegatesFocus: true};
|
||||
|
||||
/**
|
||||
* @private indicates that the element is a tab for `<md-tabs>`
|
||||
* @nocollapse
|
||||
*/
|
||||
static readonly isTab = true;
|
||||
|
||||
/**
|
||||
* Whether or not the tab is `selected`.
|
||||
**/
|
||||
|
@ -296,5 +296,5 @@ export class Tabs extends LitElement {
|
||||
}
|
||||
|
||||
function isTab(element: HTMLElement): element is Tab {
|
||||
return 'isTab' in element.constructor && element.constructor.isTab === true;
|
||||
return element instanceof Tab;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user