Fix test in collection tree selectLibrary()

getRowIndexByID() can only return an integer or false
This commit is contained in:
Dan Stillman 2023-05-27 02:33:08 -04:00
parent fda0fda7ac
commit 77241d1c71

View file

@ -523,7 +523,7 @@ var CollectionTree = class CollectionTree extends LibraryTree {
async selectLibrary(libraryID = 1) {
var row = this.getRowIndexByID('L' + libraryID);
if (row === undefined) {
if (row === false) {
Zotero.debug(`CollectionTree.selectLibrary(): library with ID ${libraryID} not found in collection tree`);
return false;
}