commit 0c49350cdfa7d85fdaacda198fd41775e690fc7c
parent 542d68cc4c1c55104d0f4c4808d8e10b8b6fc59b
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 13 Jul 2017 16:10:33 -0400
Fix startup error from empty 'collection' search condition
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/searches.js b/chrome/content/zotero/xpcom/data/searches.js
@@ -123,6 +123,11 @@ Zotero.Searches = function() {
// Parse "condition[/mode]"
let [conditionName, mode] = Zotero.SearchConditions.parseCondition(condition.condition);
+ // Not sure how this can happen, but prevent an error if it does
+ if (condition.value === null) {
+ condition.value = '';
+ }
+
let cond = Zotero.SearchConditions.get(conditionName);
if (!cond || cond.noLoad) {
Zotero.debug("Invalid saved search condition '" + conditionName + "' -- skipping", 2);