aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-06 03:59:10 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-06 03:59:10 +0800
commit8de3f03b4982f14459b10a0ef1d60ab713d5c7be (patch)
tree6d520507645e8a9160059cdb84aad6e48306fd8d
parentea2d5b9d4a7c3e59645a0b302dc6979e6b9b285f (diff)
downloaddexon-sol-tools-8de3f03b4982f14459b10a0ef1d60ab713d5c7be.tar
dexon-sol-tools-8de3f03b4982f14459b10a0ef1d60ab713d5c7be.tar.gz
dexon-sol-tools-8de3f03b4982f14459b10a0ef1d60ab713d5c7be.tar.bz2
dexon-sol-tools-8de3f03b4982f14459b10a0ef1d60ab713d5c7be.tar.lz
dexon-sol-tools-8de3f03b4982f14459b10a0ef1d60ab713d5c7be.tar.xz
dexon-sol-tools-8de3f03b4982f14459b10a0ef1d60ab713d5c7be.tar.zst
dexon-sol-tools-8de3f03b4982f14459b10a0ef1d60ab713d5c7be.zip
Use stricter check for subscribe input text
-rw-r--r--packages/website/ts/components/forms/subscribe_form.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/website/ts/components/forms/subscribe_form.tsx b/packages/website/ts/components/forms/subscribe_form.tsx
index 4bef3a7b6..04ef28e70 100644
--- a/packages/website/ts/components/forms/subscribe_form.tsx
+++ b/packages/website/ts/components/forms/subscribe_form.tsx
@@ -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({