diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js index fd4a29f576..56c7655daa 100644 --- a/chrome/content/zotero/xpcom/search.js +++ b/chrome/content/zotero/xpcom/search.js @@ -1525,7 +1525,16 @@ Zotero.Searches = new function(){ function getAll(){ var sql = "SELECT savedSearchID AS id, savedSearchName AS name " + "FROM savedSearches ORDER BY name COLLATE NOCASE"; - return Zotero.DB.query(sql); + var searches = Zotero.DB.query(sql); + if (!searches) { + return []; + } + // Do proper collation sort + var collation = Zotero.getLocaleCollation(); + searches.sort(function (a, b) { + return collation.compareString(1, a.name, b.name); + }); + return searches; }