Fix advanced search test failure after 13d55910e
This commit is contained in:
parent
e82283494b
commit
7594fe1800
1 changed files with 2 additions and 3 deletions
|
@ -828,10 +828,9 @@ Zotero.Search.prototype.search = Zotero.Promise.coroutine(function* (asTempTable
|
|||
* If this object is identified (has an id or library/key), loadAll() must have been called.
|
||||
*/
|
||||
Zotero.Search.prototype.fromJSON = function (json) {
|
||||
if (!json.name) {
|
||||
throw new Error("'name' property not provided for search");
|
||||
if (json.name) {
|
||||
this.name = json.name;
|
||||
}
|
||||
this.name = json.name;
|
||||
|
||||
Object.keys(this.getConditions()).forEach(id => this.removeCondition(id));
|
||||
for (let i = 0; i < json.conditions.length; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue