diff --git a/components/zotero-autocomplete.js b/components/zotero-autocomplete.js index 4639b7ef4..f1b11eaba 100644 --- a/components/zotero-autocomplete.js +++ b/components/zotero-autocomplete.js @@ -88,6 +88,9 @@ ZoteroAutoComplete.prototype.startSearch = function(searchString, searchParam, p statement = this._zotero.DB.getStatement(sql, sqlParams); var resultsCallback = function (results) { + if (!results) { + return; + } var collation = self._zotero.getLocaleCollation(); results.sort(function(a, b) { return collation.compareString(1, a.val, b.val);