Skip to content

Commit 9ea7230

Browse files
fix(sets): check for window to avoid SSR errors (#511)
1 parent f06f6e6 commit 9ea7230

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/sets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if (!('WeakSet' in window)) {
1+
if (typeof window !== 'undefined' && !('WeakSet' in window)) {
22
// simple polyfil for IE
33
Object.defineProperty(window, 'WeakSet', {
44
value: new (class {

0 commit comments

Comments
 (0)