Browse Source

Merge branch 'master' of https://github.com/transloadit/uppy

Artur Paikin 6 years ago
parent
commit
801e785b9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/@uppy/core/src/index.js

+ 1 - 1
packages/@uppy/core/src/index.js

@@ -785,7 +785,7 @@ class Uppy {
     })
 
     // show informer if offline
-    if (typeof window !== 'undefined') {
+    if (typeof window !== 'undefined' && window.addEventListener) {
       window.addEventListener('online', () => this.updateOnlineStatus())
       window.addEventListener('offline', () => this.updateOnlineStatus())
       setTimeout(() => this.updateOnlineStatus(), 3000)