diff --git a/chrome/content/zotero/xpcom/data/collections.js b/chrome/content/zotero/xpcom/data/collections.js index 6ca0d2f375..658b52b601 100644 --- a/chrome/content/zotero/xpcom/data/collections.js +++ b/chrome/content/zotero/xpcom/data/collections.js @@ -142,6 +142,7 @@ Zotero.Collections = function() { this.getCollectionsContainingItems = function (itemIDs, asIDs) { + if (!itemIDs.length) return []; var sql = "SELECT collectionID FROM collections WHERE "; var sqlParams = []; for (let id of itemIDs) {