Skip to content

Commit

Permalink
@slidy/element - add window check
Browse files Browse the repository at this point in the history
  • Loading branch information
Valexr committed Aug 31, 2022
1 parent fbd3bf8 commit 60199ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/element/src/slidy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ export default class Slidy extends HTMLElement {
}
}

if ('customElements' in window) {
if (typeof window === 'object' && 'customElements' in window) {
customElements.define('slidy-element', Slidy);
}

0 comments on commit 60199ed

Please sign in to comment.