Skip to content

Commit

Permalink
clients(viewer): extract the LHR from PSI json (#11650)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Nov 10, 2020
1 parent a73e19a commit 3c44137
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lighthouse-viewer/app/src/lighthouse-report-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ class LighthouseReportViewer {
if ('lhr' in json) {
json = /** @type {LH.RunnerResult} */ (json).lhr;
}
// Allow users to drop in PSI's json
if ('lighthouseResult' in json) {
json = /** @type {{lighthouseResult: LH.Result}} */ (json).lighthouseResult;
}

// Install as global for easier debugging
// @ts-expect-error
Expand Down

0 comments on commit 3c44137

Please sign in to comment.