Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
administration ui: Reset loading state in finally block
* Previously, the loading state was only reset upon successful completion of the user action. If an error occurred, such as a 403, the UI incorrectly remained in a "loading" state, leaving the button disabled and showing a loading indicator indefinitely. This change ensures that the loading state is reset under all circumstances by moving the setState call to a finally block. * Removed the line resetting the loading state from the try block. * Added a finally block to reset the loading state whether the promise is resolved or rejected.
- Loading branch information