fix: 🐛 stop showing spinner only on error (#38289)

This commit is contained in:
Vadim Dalecky 2019-06-06 10:02:57 -07:00 committed by GitHub
parent 7ad2439382
commit a1ecfffd4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,12 +127,9 @@ export class StepTimeFieldComponent extends Component {
} catch (error) {
if (!this.mounted) return;
this.setState({
error: error instanceof Error ? error.message : String(error)
error: error instanceof Error ? error.message : String(error),
isCreating: false,
});
} finally {
if (this.mounted) {
this.setState({ isCreating: false });
}
}
}