fix(tabs): use instanceof to check for a Tab

PiperOrigin-RevId: 562917297
This commit is contained in:
Andrew Jakubowicz 2023-09-05 15:55:50 -07:00 committed by Copybara-Service
parent 29f1318293
commit 58497f13b2
2 changed files with 1 additions and 7 deletions

View File

@ -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`.
**/

View File

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