Explorar o código

for debug, set uppy instance to global[this.opts.id], so we can do window.myUppyID.state

Artur Paikin %!s(int64=7) %!d(string=hai) anos
pai
achega
9cd021d20f
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/core/Core.js

+ 2 - 3
src/core/Core.js

@@ -115,10 +115,9 @@ class Uppy {
     // for debugging and testing
     // this.updateNum = 0
     if (this.opts.debug) {
-      global.UppyState = this.state
       global.uppyLog = ''
-      // global.UppyAddFile = this.addFile.bind(this)
-      global._uppy = this
+      global[this.opts.id] = this
+      // global._uppy = this
     }
   }