diff --git a/components/apps_form/apps_form.tsx b/components/apps_form/apps_form.tsx index 13dfff1a8660..a1652f35818d 100644 --- a/components/apps_form/apps_form.tsx +++ b/components/apps_form/apps_form.tsx @@ -144,8 +144,6 @@ export class AppsForm extends React.PureComponent { const res = await this.props.actions.submit(submission); const callResp = res.data as AppCallResponse; - this.setState({submitting: false}); - let hasErrors = false; let updatedForm = false; switch (callResp.type) { @@ -184,7 +182,10 @@ export class AppsForm extends React.PureComponent { if (!hasErrors && !updatedForm) { this.handleHide(true); + return; } + + this.setState({submitting: false}); }; performLookup = async (name: string, userInput: string): Promise => {