From b949cc6bb64aba474db93ba127d785897e836cdf Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 27 Jan 2020 17:38:29 -0500 Subject: [PATCH] Sometimes the issue cache has junk in it. I got this to happen after some issues had been detected on the live map, then starting the intro walkthrough (which replaces the graph). No time now to dig into the root cause, but this might make the problem go away so the tutorial doesn't get too weird. --- modules/core/validator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/validator.js b/modules/core/validator.js index 84f4c1641..71a7ad1ad 100644 --- a/modules/core/validator.js +++ b/modules/core/validator.js @@ -111,6 +111,7 @@ export function coreValidator(context) { var view = context.map().extent(); return issues.filter(function(issue) { + if (!issue) return false; if (opts.includeDisabledRules === 'only' && !_disabledRules[issue.type]) return false; if (!opts.includeDisabledRules && _disabledRules[issue.type]) return false; @@ -196,6 +197,7 @@ export function coreValidator(context) { return Array.from(issueIDs) .map(function(id) { return cache.issuesByIssueID[id]; }) .filter(function(issue) { + if (!issue) return false; if (opts.includeDisabledRules === 'only' && !_disabledRules[issue.type]) return false; if (!opts.includeDisabledRules && _disabledRules[issue.type]) return false;