Return boolean from Zotero.Library::hasItems()
Fix test breakage in 2e389de47
This commit is contained in:
parent
9eab4a8846
commit
739365fd28
1 changed files with 1 additions and 2 deletions
|
@ -572,8 +572,7 @@ Zotero.Library.prototype.hasItems = Zotero.Promise.coroutine(function* () {
|
||||||
throw new Error("Library is not saved yet");
|
throw new Error("Library is not saved yet");
|
||||||
}
|
}
|
||||||
let sql = 'SELECT COUNT(*)>0 FROM items WHERE libraryID=?';
|
let sql = 'SELECT COUNT(*)>0 FROM items WHERE libraryID=?';
|
||||||
|
return !!(yield Zotero.DB.valueQueryAsync(sql, this.libraryID));
|
||||||
return Zotero.DB.valueQueryAsync(sql, this.libraryID);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Zotero.Library.prototype.hasItem = function (item) {
|
Zotero.Library.prototype.hasItem = function (item) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue