From 912ff73d660e9216fae93114af0e26c65d763d3c Mon Sep 17 00:00:00 2001 From: Misha Moroshko Date: Sun, 28 Aug 2016 21:29:36 +1000 Subject: [PATCH] Stop searching suggestions container when node === null. Closes #230. --- src/Autosuggest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Autosuggest.js b/src/Autosuggest.js index a2fafdcb..25606a25 100644 --- a/src/Autosuggest.js +++ b/src/Autosuggest.js @@ -137,7 +137,7 @@ class Autosuggest extends Component { } node = node.parentNode; - } while (node !== document); + } while (node !== null && node !== document); }; findSuggestionElement(startNode) {