Fix PDF recognition within collection (broken by f8b41c971c)

This commit is contained in:
Dan Stillman 2018-02-28 17:34:06 -05:00
parent f99038fd37
commit 3cc92fe1e9
2 changed files with 31 additions and 2 deletions

View file

@ -256,8 +256,8 @@ Zotero.RecognizePDF = new function () {
let collections = attachment.getCollections();
await Zotero.DB.executeTransaction(async function () {
if (collections.length) {
for (let collection of collections) {
parentItem.addToCollection(collection.id);
for (let collectionID of collections) {
parentItem.addToCollection(collectionID);
}
await parentItem.save();
}