diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 6646d31a6a..6447ff5a94 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3862,6 +3862,10 @@ Zotero.Item.prototype.getBestAttachments = async function () { throw new Error("getBestAttachments() can only be called on regular items"); } + if (!this.numAttachments()) { + return []; + } + var url = this.getField('url'); var urlFieldID = Zotero.ItemFields.getID('url');