commit ef33984707d57ab179e0294a9168e25bac2ccd00 parent a68e91b0af54f053746f959f156a99f23426ef1f Author: Dan Stillman <dstillman@zotero.org> Date: Mon, 14 Dec 2009 08:12:51 +0000 Fix deleting of saved searches in groups Diffstat:
| M | chrome/content/zotero/xpcom/data/group.js | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/group.js b/chrome/content/zotero/xpcom/data/group.js @@ -321,9 +321,8 @@ Zotero.Group.prototype.erase = function() { // Delete saved searches sql = "SELECT savedSearchID FROM savedSearches WHERE libraryID=?"; ids = Zotero.DB.columnQuery(sql, this.libraryID); - for each(var id in ids) { - obj = Zotero.Searches.get(id); - obj.erase(); + if (ids) { + Zotero.Searches.erase(ids); } // Delete tags