Fix Collections.getCollectionsContainingItems() when no ids are passed

Previously it would return all collections
This commit is contained in:
Dan Stillman 2024-06-23 05:08:22 -04:00
parent c384fef867
commit c61892e4b6

View file

@ -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) {