Skip to content

Commit

Permalink
Disallow blank search
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Sep 1, 2016
1 parent 5f8ef38 commit 16ff60d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/SearchContainer/SearchContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ export default class SearchContainer extends Component {
return;
}
if (!this.state.pathfindingIsOpen) {
var statement = "MATCH (n) WHERE n.name =~ '(?i).*{}.*' RETURN n".format(escapeRegExp(start));
emitter.emit('searchQuery', statement)
if (start !== ""){
var statement = "MATCH (n) WHERE n.name =~ '(?i).*{}.*' RETURN n".format(escapeRegExp(start));
emitter.emit('searchQuery', statement)
}
} else {
var start = jQuery(this.refs.searchbar).val();
var end = jQuery(this.refs.pathbar).val();
Expand Down

0 comments on commit 16ff60d

Please sign in to comment.