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.
This commit is contained in:
Bryan Housel
2020-01-27 17:38:29 -05:00
parent d69cf532e0
commit b949cc6bb6

View File

@@ -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;