Do not insert citation for parentless PDF

This commit is contained in:
Martynas Bagdonas 2021-02-16 17:26:32 +02:00 committed by Dan Stillman
parent 8d87eeae35
commit 7fa68690dd

View file

@ -190,7 +190,7 @@ class EditorInstance {
annotation.uri = Zotero.URI.getItemURI(attachmentItem);
// Citation
let parentItem = attachmentItem.parentID && await Zotero.Items.getAsync(attachmentItem.parentID) || attachmentItem;
let parentItem = attachmentItem.parentID && await Zotero.Items.getAsync(attachmentItem.parentID);
if (parentItem) {
let citationItem = {
uris: [Zotero.URI.getItemURI(parentItem)],