mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-26 03:35:19 +00:00
Merge pull request #938 from transloadit/wrong-no-files-msg
fix: fix wrong 'no files available' msg flash
This commit is contained in:
commit
646b10edcb
1 changed files with 7 additions and 2 deletions
|
|
@ -523,8 +523,13 @@ module.exports = class ProviderView {
|
|||
// displays loader view while asynchronous request is being made.
|
||||
_loaderWrapper (promise, then, catch_) {
|
||||
promise
|
||||
.then(then).catch(catch_)
|
||||
.then(() => this.plugin.setPluginState({ loading: false })) // always called.
|
||||
.then((result) => {
|
||||
this.plugin.setPluginState({ loading: false })
|
||||
then(result)
|
||||
}).catch((err) => {
|
||||
this.plugin.setPluginState({ loading: false })
|
||||
catch_(err)
|
||||
})
|
||||
this.plugin.setPluginState({ loading: true })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue