Преглед изворни кода

rename window test/debug variables

now it’s window._uppy and addFile is window._uppy.addFile
Artur Paikin пре 7 година
родитељ
комит
3f64c367a3
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2 2
      src/core/Core.js
  2. 1 1
      test/acceptance/tools.js

+ 2 - 2
src/core/Core.js

@@ -96,8 +96,8 @@ class Uppy {
     if (this.opts.debug) {
     if (this.opts.debug) {
       global.UppyState = this.state
       global.UppyState = this.state
       global.uppyLog = ''
       global.uppyLog = ''
-      global.UppyAddFile = this.addFile.bind(this)
-      global._Uppy = this
+      // global.UppyAddFile = this.addFile.bind(this)
+      global._uppy = this
     }
     }
   }
   }
 
 

+ 1 - 1
test/acceptance/tools.js

@@ -9,7 +9,7 @@ function uppySelectFakeFile () {
     ['data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTIwIDEyMCI+CiAgPGNpcmNsZSBjeD0iNjAiIGN5PSI2MCIgcj0iNTAiLz4KPC9zdmc+Cg=='],
     ['data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTIwIDEyMCI+CiAgPGNpcmNsZSBjeD0iNjAiIGN5PSI2MCIgcj0iNTAiLz4KPC9zdmc+Cg=='],
     {type: 'image/svg+xml'}
     {type: 'image/svg+xml'}
   )
   )
-  window.UppyAddFile({
+  window._uppy.addFile({
     source: 'acceptance-test',
     source: 'acceptance-test',
     name: 'test-file',
     name: 'test-file',
     type: 'image/svg+xml',
     type: 'image/svg+xml',