Skip to content

Commit

Permalink
@uppy/aws-s3-multipart: fix linter issues (#3188)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Sep 10, 2021
1 parent 581c2f3 commit 017c21a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/@uppy/aws-s3-multipart/src/MultipartUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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()
}
}

Expand Down

0 comments on commit 017c21a

Please sign in to comment.