commit 739365fd28103cd2ee7845df37941c990e9b5d12 parent 9eab4a8846aeebd2bb01f835d6a86b25bc74f57e Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 7 Jan 2016 16:27:36 -0500 Return boolean from Zotero.Library::hasItems() Fix test breakage in 2e389de47 Diffstat:
| M | chrome/content/zotero/xpcom/data/library.js | | | 3 | +-- |
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/library.js b/chrome/content/zotero/xpcom/data/library.js @@ -572,8 +572,7 @@ Zotero.Library.prototype.hasItems = Zotero.Promise.coroutine(function* () { throw new Error("Library is not saved yet"); } let sql = 'SELECT COUNT(*)>0 FROM items WHERE libraryID=?'; - - return Zotero.DB.valueQueryAsync(sql, this.libraryID); + return !!(yield Zotero.DB.valueQueryAsync(sql, this.libraryID)); }); Zotero.Library.prototype.hasItem = function (item) {