Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit f383bdd

Browse files
authored
Merge pull request #1 from ithaka/conditionally-register-element
Register the focus-trap element only if it isn't already
2 parents efe5491 + e9b492e commit f383bdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/focus-trap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,4 @@ export class FocusTrap extends HTMLElement implements IFocusTrap {
204204
}
205205
}
206206

207-
window.customElements.define("focus-trap", FocusTrap);
207+
if (!window.customElements.get('focus-trap')) customElements.define('focus-trap', FocusTrap);

0 commit comments

Comments
 (0)