From e409c8bc274ce548c003b7223fad71367719408d Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Tue, 23 Feb 2021 15:58:14 +0200 Subject: [PATCH] Improve navigation to specific PDF page --- chrome/content/zotero/xpcom/editorInstance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/editorInstance.js b/chrome/content/zotero/xpcom/editorInstance.js index 39d381cfac..f8e4b6f08d 100644 --- a/chrome/content/zotero/xpcom/editorInstance.js +++ b/chrome/content/zotero/xpcom/editorInstance.js @@ -343,7 +343,7 @@ class EditorInstance { if (!item) { return; } - let attachments = Zotero.Items.get(item.getAttachments()); + let attachments = Zotero.Items.get(item.getAttachments()).filter(x => x.isPDFAttachment()); if (citationItem.locator && attachments.length === 1) { await Zotero.Reader.open(attachments[0].id, { pageLabel: citationItem.locator }); }