www

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

commit 64fe2c3ac3904c14b685d13169c652080aa44d59
parent 6d9260934d06974f12f685057d16c20e78f8f1f0
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 24 Jan 2012 02:28:32 -0500

Fix item.getAttachments() when sortAttachmentsChronologically is true

Caused a duplicate merging error, and possibly others

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -3285,7 +3285,8 @@ Zotero.Item.prototype.getAttachments = function(includeTrashed) { if (Zotero.Prefs.get('sortAttachmentsChronologically')) { sql += " ORDER BY dateAdded"; - return Zotero.DB.columnQuery(sql, this.id); + var results = Zotero.DB.columnQuery(sql, this.id); + return results ? results : []; } var attachments = Zotero.DB.query(sql, this.id);