Skip to content

Commit

Permalink
Fix UI spinner stopping immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithan committed Oct 31, 2019
1 parent 20d02af commit c0a64e6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ module.exports.spin = async (promise, str) => {
return promise;
}

try {
spinner = new Spinner(str);
spinner.start();
return promise;
} finally {
spinner.stop(true);
}
spinner = new Spinner(str);
spinner.start();
return promise.finally(() => spinner.stop(true));
};

0 comments on commit c0a64e6

Please sign in to comment.