Fix crash when search uses no-op condition and includeParentsAndChildren
E.g., a nonexistent saved search
This commit is contained in:
parent
9e2ea008f4
commit
76081ab05f
2 changed files with 21 additions and 0 deletions
|
@ -409,6 +409,19 @@ describe("Zotero.Search", function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe("includeParentsAndChildren", function () {
|
||||
it("should handle ANY search with no-op condition", 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('includeParentsAndChildren', 'true');
|
||||
var matches = await s.search();
|
||||
assert.lengthOf(matches, 0);
|
||||
});
|
||||
});
|
||||
|
||||
describe("key", function () {
|
||||
it("should allow more than max bound parameters", function* () {
|
||||
let s = new Zotero.Search();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue