From 7594fe18006436e2d2e8d2ac2795b87e453c3626 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 17 Dec 2018 05:36:14 -0500 Subject: [PATCH] Fix advanced search test failure after 13d55910e --- chrome/content/zotero/xpcom/data/search.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/search.js b/chrome/content/zotero/xpcom/data/search.js index 21fbc0d40b..ccae5c4bbd 100644 --- a/chrome/content/zotero/xpcom/data/search.js +++ b/chrome/content/zotero/xpcom/data/search.js @@ -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++) {