diff options
author | Simon Knox <psimyn@gmail.com> | 2017-11-02 13:13:34 +0200 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2017-11-02 13:15:33 +0200 |
commit | 970386e60364ea12489b0fbaadc6003701af85bc (patch) | |
tree | eaab67fe19150907b9baa3f21f0dcbbd7c0ea7cb /app/assets/javascripts/smart_interval.js | |
parent | 17f2ba7facb64268ef14f6c29e79cf0e240c78d9 (diff) | |
download | gitlab-ce-970386e60364ea12489b0fbaadc6003701af85bc.tar.gz |
review feedback - throw error in smart_callback catch block
Diffstat (limited to 'app/assets/javascripts/smart_interval.js')
-rw-r--r-- | app/assets/javascripts/smart_interval.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/smart_interval.js b/app/assets/javascripts/smart_interval.js index f7cddc7e874..03fac82ac6d 100644 --- a/app/assets/javascripts/smart_interval.js +++ b/app/assets/javascripts/smart_interval.js @@ -5,7 +5,7 @@ export default class SmartInterval { /** - * @param { function } opts.callback A Promise, called on each iteration (required) unless still in progress + * @param { function } opts.callback Function that returns a promise, called on each iteration unless still in progress (required) * @param { milliseconds } opts.startingInterval `currentInterval` is set to this initially * @param { milliseconds } opts.maxInterval `currentInterval` will be incremented to this * @param { milliseconds } opts.hiddenInterval `currentInterval` is set to this @@ -113,8 +113,9 @@ export default class SmartInterval { .then(() => { this.isLoading = false; }) - .catch(() => { + .catch((err) => { this.isLoading = false; + throw new Error(err); }); } |