Skip to content

Commit

Permalink
Only use globalThis on creation of manualSlotsSupported
Browse files Browse the repository at this point in the history
  • Loading branch information
owenniblock committed Feb 29, 2024
1 parent 7ba7bad commit a9ac510
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tab-container-element.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const HTMLElement = globalThis.HTMLElement || (null as unknown as (typeof window)['HTMLElement'])
const HTMLSlotElement = globalThis.HTMLSlotElement || (null as unknown as (typeof window)['HTMLSlotElement'])
const manualSlotsSupported = 'assign' in HTMLSlotElement.prototype
const manualSlotsSupported = 'assign' in (globalThis.HTMLSlotElement?.prototype || {})

export class TabContainerChangeEvent extends Event {
constructor(type: string, {tab, panel, ...init}: EventInit & {tab?: Element; panel?: Element}) {
Expand Down

0 comments on commit a9ac510

Please sign in to comment.