From 58497f13b2ca494f233c290f6571f5f03f142d7f Mon Sep 17 00:00:00 2001 From: Andrew Jakubowicz Date: Tue, 5 Sep 2023 15:55:50 -0700 Subject: [PATCH] fix(tabs): use instanceof to check for a Tab PiperOrigin-RevId: 562917297 --- tabs/internal/tab.ts | 6 ------ tabs/internal/tabs.ts | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/tabs/internal/tab.ts b/tabs/internal/tab.ts index 2eb2d7854..537f324de 100644 --- a/tabs/internal/tab.ts +++ b/tabs/internal/tab.ts @@ -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 `` - * @nocollapse - */ - static readonly isTab = true; - /** * Whether or not the tab is `selected`. **/ diff --git a/tabs/internal/tabs.ts b/tabs/internal/tabs.ts index 47e56e040..70716fd45 100644 --- a/tabs/internal/tabs.ts +++ b/tabs/internal/tabs.ts @@ -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; }