Use stricter check for subscribe input text

This commit is contained in:
fragosti
2018-06-05 12:59:10 -07:00
parent ea2d5b9d4a
commit 8de3f03b49

View File

@@ -1,4 +1,5 @@
import { colors } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';
import { Button } from 'ts/components/ui/button';
@@ -102,7 +103,7 @@ export class SubscribeForm extends React.Component<SubscribeFormProps, Subscribe
}
private async _handleFormSubmitAsync(event: React.FormEvent<HTMLInputElement>): Promise<void> {
event.preventDefault();
if (!this.state.emailText) {
if (_.isUndefined(this.state.emailText) || _.isEmpty(this.state.emailText)) {
return;
}
this.setState({