From 354bc15ab0570158d8014a78645c39865dc90389 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Thu, 8 Mar 2018 13:51:05 -0800 Subject: [PATCH] closure. --- lighthouse-core/report/v2/renderer/category-renderer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lighthouse-core/report/v2/renderer/category-renderer.js b/lighthouse-core/report/v2/renderer/category-renderer.js index c45f127cc4a1..661639900739 100644 --- a/lighthouse-core/report/v2/renderer/category-renderer.js +++ b/lighthouse-core/report/v2/renderer/category-renderer.js @@ -203,11 +203,13 @@ class CategoryRenderer { // While we could support rendering multiple groups of manual audits, it doesn't // seem desirable for UX or renderer complexity. So we'll throw. const groupsIds = Array.from(new Set(manualAudits.map(a => a.group))); - // eslint-disable-next-line no-console + /* eslint-disable no-console */ console.assert(groupsIds.length <= 1, 'More than 1 manual audit group found.'); + console.assert(!groupsIds.has(undefined), 'Some manual audits don\'t belong to a group'); + /* eslint-enable no-console */ if (!groupsIds.length) return; - const groupId = groupsIds[0]; + const groupId = /** @type {string} */ (groupsIds[0]); const auditGroupElem = this.renderAuditGroup(groupDefinitions[groupId], {expandable: true}); auditGroupElem.classList.add('lh-audit-group--manual');