diff --git a/src/Tribute.js b/src/Tribute.js index 603382e9..68fde55e 100755 --- a/src/Tribute.js +++ b/src/Tribute.js @@ -472,7 +472,7 @@ class Tribute { selectItemAtIndex(index, originalEvent) { index = parseInt(index); - if (typeof index !== "number" || isNaN(index)) return; + if (typeof index !== "number" || isNaN(index) || !this.current.filteredItems) return; let item = this.current.filteredItems[index]; let content = this.current.collection.selectTemplate(item); if (content !== null) this.replaceText(content, originalEvent, item);