Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map(audit => {
const baseAudit = baseLhr && baseLhr.audits[audit.id || ''];
const diffs = baseAudit
? findAuditDiffs(baseAudit, audit, {...options, synthesizeItemKeyDiffs: true})
: [];
const maxSeverity = Math.max(...diffs.map(getDiffSeverity), 0);
return {audit, baseAudit, diffs, maxSeverity, group: intermediateGroup.group};
})
.filter(pair => !pair.baseAudit || pair.diffs.length);
.map(audit => {
const baseAudit = baseLhr && baseLhr.audits[audit.id || ''];
const diffs = baseAudit ? findAuditDiffs(baseAudit, audit) : [];
const maxSeverity = Math.max(...diffs.map(getDiffSeverity), 0);
return {audit, baseAudit, diffs, maxSeverity, group: intermediateGroup.group};
})
.filter(pair => !pair.baseAudit || pair.diffs.length);