Fix progress window hang if Find Available PDF fails
This commit is contained in:
parent
0f1687f1c7
commit
7cf6634764
1 changed files with 8 additions and 3 deletions
|
@ -3874,9 +3874,14 @@ var ZoteroPane = new function()
|
|||
for (let i = 0; i < items.length; i++) {
|
||||
let item = items[i];
|
||||
if (Zotero.Attachments.canFindPDFForItem(item)) {
|
||||
let attachment = await Zotero.Attachments.addAvailablePDF(item);
|
||||
if (attachment) {
|
||||
successful++;
|
||||
try {
|
||||
let attachment = await Zotero.Attachments.addAvailablePDF(item);
|
||||
if (attachment) {
|
||||
successful++;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
}
|
||||
}
|
||||
itemProgress.setProgress(((i + 1) / items.length) * 100);
|
||||
|
|
Loading…
Reference in a new issue