mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-26 03:35:19 +00:00
simplify pauseResume
This commit is contained in:
parent
97cd38798b
commit
bfe42c3a47
1 changed files with 4 additions and 10 deletions
|
|
@ -458,16 +458,10 @@ class Uppy {
|
|||
const wasPaused = updatedFiles[fileID].isPaused || false
|
||||
const isPaused = !wasPaused
|
||||
|
||||
let updatedFile
|
||||
if (wasPaused) {
|
||||
updatedFile = Object.assign({}, updatedFiles[fileID], {
|
||||
isPaused: false
|
||||
})
|
||||
} else {
|
||||
updatedFile = Object.assign({}, updatedFiles[fileID], {
|
||||
isPaused: true
|
||||
})
|
||||
}
|
||||
const updatedFile = Object.assign({}, updatedFiles[fileID], {
|
||||
isPaused: isPaused
|
||||
})
|
||||
|
||||
updatedFiles[fileID] = updatedFile
|
||||
this.setState({files: updatedFiles})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue