Skip to content

Commit 0db4417

Browse files
Merge 4d4c20d into 8c36958
2 parents 8c36958 + 4d4c20d commit 0db4417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/firestore/src/util/async_queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class AsyncQueue {
240240

241241
constructor() {
242242
const window = PlatformSupport.getPlatform().window;
243-
if (window) {
243+
if (window && typeof window.addEventListener === 'function') {
244244
window.addEventListener('visibilitychange', this.visibilityHandler);
245245
}
246246
}

0 commit comments

Comments
 (0)