mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-23 18:29:09 +00:00
check for typeof document !== 'undefined' instead of window to fix React Native
This commit is contained in:
parent
c4f7d33c69
commit
068e6e837d
1 changed files with 1 additions and 1 deletions
|
|
@ -785,7 +785,7 @@ class Uppy {
|
|||
})
|
||||
|
||||
// show informer if offline
|
||||
if (typeof window !== 'undefined') {
|
||||
if (typeof document !== 'undefined') {
|
||||
window.addEventListener('online', () => this.updateOnlineStatus())
|
||||
window.addEventListener('offline', () => this.updateOnlineStatus())
|
||||
setTimeout(() => this.updateOnlineStatus(), 3000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue