Explorar el Código

companion: overwrite bytestotal for only tus uploads

Ifedapo Olarewaju hace 6 años
padre
commit
d9ec8d28f4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/@uppy/companion/src/server/Uploader.js

+ 1 - 1
packages/@uppy/companion/src/server/Uploader.js

@@ -225,7 +225,7 @@ class Uploader {
    */
   emitProgress (bytesUploaded, bytesTotal) {
     bytesTotal = bytesTotal || this.options.size
-    if (this.tus.options.uploadLengthDeferred && this.streamsEnded) {
+    if (this.tus && this.tus.options.uploadLengthDeferred && this.streamsEnded) {
       bytesTotal = this.bytesWritten
     }
     const percentage = (bytesUploaded / bytesTotal * 100)