Fix error double-clicking on unopened regular items
This commit is contained in:
parent
f358975153
commit
40f111832c
|
@ -3489,10 +3489,11 @@ var ZoteroPane = new function()
|
||||||
|
|
||||||
// Fall back to first attachment link
|
// Fall back to first attachment link
|
||||||
if (!uri) {
|
if (!uri) {
|
||||||
var link = item.getAttachments()[0];
|
yield item.loadChildItems();
|
||||||
if (link) {
|
let attachmentID = item.getAttachments()[0];
|
||||||
link = yield Zotero.Items.getAsync(link);
|
if (attachmentID) {
|
||||||
if (link) uri = link.getField('url');
|
let attachment = yield Zotero.Items.getAsync(attachmentID);
|
||||||
|
if (attachment) uri = attachment.getField('url');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user