Skip to content

Commit

Permalink
Check for existing customElements
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisands committed Jul 13, 2024
1 parent 468e4cc commit 805d5e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/src/app/utils/web-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ export function fixMobileSafariActiveTransition(): void {
}

export function defineStylesRoot(): void {
customElements.define(globalStylesTag, class TcRootElement extends HTMLElement {});
if (!customElements.get(globalStylesTag)) {
customElements.define(globalStylesTag, class TcRootElement extends HTMLElement {});
}
}

/**
Expand Down

0 comments on commit 805d5e2

Please sign in to comment.