Skip to content

Commit

Permalink
fix(tabs): revert isTab check so it is possible to create your own tab
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 568887695
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Sep 27, 2023
1 parent e8fcfa3 commit db3c865
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 0 additions & 7 deletions tabs/internal/tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ export class Tab extends LitElement {
setupHostAria(Tab);
}

/**
* Indicates that the element is a tab for `<md-tabs>`. Useful when
* clients implement their own custom `md-tab` components.
* @nocollapse
*/
static readonly isTab = true;

/**
* Whether or not the tab is selected.
**/
Expand Down
3 changes: 1 addition & 2 deletions tabs/internal/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,5 @@ export class Tabs extends LitElement {
}

function isTab(element: unknown): element is Tab {
if (!element) return false;
return 'isTab' in element.constructor && element.constructor.isTab === true;
return element instanceof Tab;
}

0 comments on commit db3c865

Please sign in to comment.