Skip to content

Commit

Permalink
fix(spinner): avoid promise failures on paused spinner (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
larcin authored May 20, 2020
1 parent eacdaf9 commit bc11afe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ class Spinner {
return result;
})
.catch((error) => {
this.fail({ text: error });
// NOTICE: Only trigger the fail if the spinner is running (ie. not paused)
if (this.isRunning()) {
this.fail({ text: error });
}
throw error;
});
}
Expand Down

0 comments on commit bc11afe

Please sign in to comment.