From 4a610296e257b035b95f65f76d0a4c5eca3654a8 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 12 Oct 2016 16:09:00 -0600 Subject: [PATCH] Add check for undefined formData --- src/views/search/search.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index 87e2b9ae0..22d99f5f5 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -75,7 +75,11 @@ var Search = injectIntl(React.createClass({ }.bind(this)); }, onSearchSubmit: function (formData) { - window.location.href = '/search/projects?q=' + formData.q; + if (!formData.q){ + window.location.href = '/search/projects?q=' + this.props.searchTerm; + } else { + window.location.href = '/search/projects?q=' + formData.q; + } }, getTab: function (type) { var term = this.props.searchTerm.split(' ').join('+');