www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 40f111832ca136c2122452b0708e91bf6443eaf9
parent f3589751536fc7138931629a08af2e771ed70207
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 11 Aug 2014 00:34:20 -0400

Fix error double-clicking on unopened regular items

Diffstat:
Mchrome/content/zotero/zoteroPane.js | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -3489,10 +3489,11 @@ var ZoteroPane = new function() // Fall back to first attachment link if (!uri) { - var link = item.getAttachments()[0]; - if (link) { - link = yield Zotero.Items.getAsync(link); - if (link) uri = link.getField('url'); + yield item.loadChildItems(); + let attachmentID = item.getAttachments()[0]; + if (attachmentID) { + let attachment = yield Zotero.Items.getAsync(attachmentID); + if (attachment) uri = attachment.getField('url'); } }