Skip to content

Commit

Permalink
Stop searching suggestions container when node === null. Closes #230.
Browse files Browse the repository at this point in the history
  • Loading branch information
moroshko committed Aug 28, 2016
1 parent be83900 commit 912ff73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Autosuggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class Autosuggest extends Component {
}

node = node.parentNode;
} while (node !== document);
} while (node !== null && node !== document);
};

findSuggestionElement(startNode) {
Expand Down

0 comments on commit 912ff73

Please sign in to comment.