Fix item.getAttachments() when sortAttachmentsChronologically is true
Caused a duplicate merging error, and possibly others
This commit is contained in:
parent
6d9260934d
commit
64fe2c3ac3
1 changed files with 2 additions and 1 deletions
|
@ -3285,7 +3285,8 @@ Zotero.Item.prototype.getAttachments = function(includeTrashed) {
|
||||||
|
|
||||||
if (Zotero.Prefs.get('sortAttachmentsChronologically')) {
|
if (Zotero.Prefs.get('sortAttachmentsChronologically')) {
|
||||||
sql += " ORDER BY dateAdded";
|
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);
|
var attachments = Zotero.DB.query(sql, this.id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue