Browse Source

@uppy/aws-s3-multipart: fix linter issues (#3188)

Antoine du Hamel 3 years ago
parent
commit
017c21a92c
1 changed files with 5 additions and 6 deletions
  1. 5 6
      packages/@uppy/aws-s3-multipart/src/MultipartUploader.js

+ 5 - 6
packages/@uppy/aws-s3-multipart/src/MultipartUploader.js

@@ -327,6 +327,7 @@ class MultipartUploader {
     xhr.responseType = 'text'
 
     function cleanup () {
+      // eslint-disable-next-line no-use-before-define
       signal.removeEventListener('abort', onabort)
     }
     function onabort () {
@@ -357,6 +358,7 @@ class MultipartUploader {
         defer.reject(error)
         return
       }
+
       // This avoids the net::ERR_OUT_OF_MEMORY in Chromium Browsers.
       this.chunks[index] = null
 
@@ -442,12 +444,9 @@ class MultipartUploader {
     this.isPaused = true
   }
 
-  abort (opts = {}) {
-    const really = opts.really || false
-
-    if (!really) return this.pause()
-
-    this.#abortUpload()
+  abort (opts = undefined) {
+    if (opts?.really) this.#abortUpload()
+    else this.pause()
   }
 }