From 40f4e2dc5ec558a1e8865c053bd231b6f903fd24 Mon Sep 17 00:00:00 2001 From: Ifedapo Olarewaju Date: Sun, 1 Jul 2018 13:20:09 +0100 Subject: [PATCH] fix: fix wrong 'no files available' msg flash Fixes #908 --- packages/@uppy/provider-views/src/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/@uppy/provider-views/src/index.js b/packages/@uppy/provider-views/src/index.js index 5714f924e..b29a4fde9 100644 --- a/packages/@uppy/provider-views/src/index.js +++ b/packages/@uppy/provider-views/src/index.js @@ -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 }) }