Skip to content

Commit

Permalink
report: only appendScoreScale to scoreHeader if it exists (GoogleChro…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored and kdzwinel committed Aug 16, 2018
1 parent e39133b commit 8920b20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lighthouse-core/report/html/renderer/report-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ class ReportRenderer {
categories.appendChild(renderer.render(category, report.reportGroups));
}

const scoreScale = this._dom.cloneTemplate('#tmpl-lh-scorescale', this._templateContext);
scoreHeader.appendChild(scoreScale);
if (scoreHeader) {
const scoreScale = this._dom.cloneTemplate('#tmpl-lh-scorescale', this._templateContext);
scoreHeader.appendChild(scoreScale);
}

reportSection.appendChild(this._renderReportFooter(report));

Expand Down

0 comments on commit 8920b20

Please sign in to comment.