replace this.getState().files with this.uppy.getState().files (#4167)

* replace this.getState().files with this.uppy.getState.files

* We actually want to check if the file is NOT present
This commit is contained in:
Artur Paikin 2022-10-24 17:33:22 +02:00 committed by GitHub
parent aa2ffa589b
commit 618cc69e61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -287,7 +287,7 @@ export default class MiniXHRUpload {
}
const serverToken = await this.#queueRequestSocketToken(file)
if (this.getState().files[file.id]) return undefined
if (!this.uppy.getState().files[file.id]) return undefined
this.uppy.setFileState(file.id, { serverToken })
return this.connectToServerSocket(this.uppy.getFile(file.id))

View file

@ -474,7 +474,7 @@ export default class Tus extends BasePlugin {
}
const serverToken = await this.#queueRequestSocketToken(file)
if (this.getState().files[file.id]) return undefined
if (!this.uppy.getState().files[file.id]) return undefined
this.uppy.setFileState(file.id, { serverToken })
return this.connectToServerSocket(this.uppy.getFile(file.id))

View file

@ -385,7 +385,7 @@ export default class XHRUpload extends BasePlugin {
}
const serverToken = await this.#queueRequestSocketToken(file)
if (this.getState().files[file.id]) return undefined
if (!this.uppy.getState().files[file.id]) return undefined
this.uppy.setFileState(file.id, { serverToken })
return this.connectToServerSocket(this.uppy.getFile(file.id))