Add check for undefined formData

This commit is contained in:
Technoboy10 2016-10-12 16:09:00 -06:00
parent 4074b986c2
commit 4a610296e2

View file

@ -75,7 +75,11 @@ var Search = injectIntl(React.createClass({
}.bind(this));
},
onSearchSubmit: function (formData) {
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('+');