Additional fix for search crash with includeParentsAndChildren

Follow-up to 76081ab05
This commit is contained in:
Dan Stillman 2020-02-11 13:08:20 -05:00
parent 1db3fc0b49
commit a53f363b8d
2 changed files with 39 additions and 33 deletions

View file

@ -420,6 +420,18 @@ describe("Zotero.Search", function() {
var matches = await s.search();
assert.lengthOf(matches, 0);
});
it("should handle ANY search with two no-op conditions", async function () {
var s = new Zotero.Search();
s.libraryID = userLibraryID;
s.name = "Test";
s.addCondition('joinMode', 'any');
s.addCondition('savedSearch', 'is', Zotero.Utilities.randomString());
s.addCondition('savedSearch', 'is', Zotero.Utilities.randomString());
s.addCondition('includeParentsAndChildren', 'true');
var matches = await s.search();
assert.lengthOf(matches, 0);
});
});
describe("key", function () {