From 3603254d357f4e8c063f8546723f2dc666fc7953 Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:43:04 +0800 Subject: [PATCH] Fix attachment row rendering bug with web attachment --- chrome/content/zotero/elements/attachmentRow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/attachmentRow.js b/chrome/content/zotero/elements/attachmentRow.js index acc4d72100..d82e939343 100644 --- a/chrome/content/zotero/elements/attachmentRow.js +++ b/chrome/content/zotero/elements/attachmentRow.js @@ -119,7 +119,7 @@ import { getCSSItemTypeIcon } from 'components/icons'; this._attachmentButton.querySelector(".icon").replaceWith(getCSSItemTypeIcon(this._attachment.getItemTypeIconName())); this._attachmentButton.querySelector(".label").textContent = this._attachment.getField('title'); - let annotationCount = this.attachment.getAnnotations().length; + let annotationCount = this.attachment.isWebAttachment() ? 0 : this.attachment.getAnnotations().length; this._annotationButton.hidden = annotationCount === 0; this._annotationButton.querySelector(".label").textContent = annotationCount; }