Skip to content

Commit a9ac510

Browse files
committed
Only use globalThis on creation of manualSlotsSupported
1 parent 7ba7bad commit a9ac510

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/tab-container-element.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const HTMLElement = globalThis.HTMLElement || (null as unknown as (typeof window)['HTMLElement'])
2-
const HTMLSlotElement = globalThis.HTMLSlotElement || (null as unknown as (typeof window)['HTMLSlotElement'])
3-
const manualSlotsSupported = 'assign' in HTMLSlotElement.prototype
2+
const manualSlotsSupported = 'assign' in (globalThis.HTMLSlotElement?.prototype || {})
43

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

0 commit comments

Comments
 (0)