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

This commit is contained in:
Vadim Dalecky 2019-06-06 13:05:49 -07:00 committed by GitHub
parent 0e82b89564
commit f1c13c9b17
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 });
}
}
}