From c21c5632c2ceaca4a464fd521ff80fdfde8efda7 Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:51:27 +0800 Subject: [PATCH] Fix attachment row annotation button bug (#3577) --- chrome/content/zotero/elements/attachmentRow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/elements/attachmentRow.js b/chrome/content/zotero/elements/attachmentRow.js index e303d23ffc..315705cf06 100644 --- a/chrome/content/zotero/elements/attachmentRow.js +++ b/chrome/content/zotero/elements/attachmentRow.js @@ -119,8 +119,8 @@ 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.isWebAttachment() ? 0 : this.attachment.getAnnotations().length; - this._annotationButton.hidden = annotationCount === 0; + let annotationCount = this.attachment.isFileAttachment() ? this.attachment.getAnnotations().length : 0; + this._annotationButton.hidden = annotationCount == 0; this._annotationButton.querySelector(".label").textContent = annotationCount; } }