Skip to content

Commit

Permalink
Merge pull request #531 from particle-iot/bugfix/ui-spinner
Browse files Browse the repository at this point in the history
Fix UI spinner stopping immediately
  • Loading branch information
wraithan committed Oct 31, 2019
2 parents 20d02af + c0a64e6 commit dee6def
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 dee6def

Please sign in to comment.