Improve navigation to specific PDF page

This commit is contained in:
Martynas Bagdonas 2021-02-23 15:58:14 +02:00 committed by Dan Stillman
parent 4b622f074d
commit e409c8bc27

View file

@ -343,7 +343,7 @@ class EditorInstance {
if (!item) { if (!item) {
return; 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) { if (citationItem.locator && attachments.length === 1) {
await Zotero.Reader.open(attachments[0].id, { pageLabel: citationItem.locator }); await Zotero.Reader.open(attachments[0].id, { pageLabel: citationItem.locator });
} }