Fix getNotes() with sortNotesChronologically

This commit is contained in:
Dan Stillman 2012-01-24 04:46:44 -05:00
parent 64fe2c3ac3
commit 1b2a8d38e6

View file

@ -2484,7 +2484,8 @@ Zotero.Item.prototype.getNotes = function(includeTrashed) {
if (Zotero.Prefs.get('sortNotesChronologically')) {
sql += " ORDER BY dateAdded";
return Zotero.DB.columnQuery(sql, this.id);
var results = Zotero.DB.columnQuery(sql, this.id);
return results ? results : [];
}
var notes = Zotero.DB.query(sql, this.id);