Skip to content

Commit

Permalink
fixes flagged by LGTM.com (#1876)
Browse files Browse the repository at this point in the history
* aws-s3-multipart: fix typo

This was doing a weird thing and probably causing more cancellation
bugs.

Flagged by lgtm.com

* form: fix comparison

* companion-client: fix use strict directive
  • Loading branch information
goto-bus-stop authored Oct 11, 2019
1 parent e31af72 commit aee4dee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/@uppy/aws-s3-multipart/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ module.exports = class AwsS3Multipart extends Plugin {
const token = file.serverToken
const host = getSocketHost(file.remote.companionUrl)
const socket = new Socket({ target: `${host}/api/${token}`, autoOpen: false })
this.uploaderSockets[socket] = socket
this.uploaderSockets[file.id] = socket
this.uploaderEvents[file.id] = new EventTracker(this.uppy)

this.onFileRemove(file.id, (removed) => {
Expand Down
3 changes: 2 additions & 1 deletion packages/@uppy/companion-client/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use-strict'
'use strict'

/**
* Manages communications with Companion
*/
Expand Down
1 change: 1 addition & 0 deletions packages/@uppy/companion-client/src/tokenStorage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict'

/**
* This module serves as an Async wrapper for LocalStorage
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/form/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ module.exports = class Form extends Plugin {

install () {
this.form = findDOMElement(this.opts.target)
if (!this.form || !this.form.nodeName === 'FORM') {
if (!this.form || this.form.nodeName !== 'FORM') {
this.uppy.log('Form plugin requires a <form> target element passed in options to operate, none was found', 'error')
return
}
Expand Down

0 comments on commit aee4dee

Please sign in to comment.