From 0c49350cdfa7d85fdaacda198fd41775e690fc7c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 13 Jul 2017 16:10:33 -0400 Subject: [PATCH] Fix startup error from empty 'collection' search condition --- chrome/content/zotero/xpcom/data/searches.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/data/searches.js b/chrome/content/zotero/xpcom/data/searches.js index acd0f3f47..d05a342c9 100644 --- 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);