Skip to content

Commit

Permalink
Resolve post rebase artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnj committed Jan 27, 2023
1 parent 9186f81 commit 5b5bc80
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
12 changes: 8 additions & 4 deletions core/test/fixtures/fraggle-rock/reports/sample-flow-result.json
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,8 @@
"key": "startTime",
"valueType": "ms",
"granularity": 1,
"label": "Start Time"
"label": "Start Time",
"dontAggregate": true
},
{
"key": "duration",
Expand Down Expand Up @@ -8726,7 +8727,8 @@
"key": "startTime",
"valueType": "ms",
"granularity": 1,
"label": "Start Time"
"label": "Start Time",
"dontAggregate": true
},
{
"key": "duration",
Expand Down Expand Up @@ -8866,7 +8868,8 @@
"key": "cacheLifetimeMs",
"valueType": "ms",
"label": "Cache TTL",
"displayUnit": "duration"
"displayUnit": "duration",
"dontAggregate": true
},
{
"key": "totalBytes",
Expand Down Expand Up @@ -17367,7 +17370,8 @@
"key": "startTime",
"valueType": "ms",
"granularity": 1,
"label": "Start Time"
"label": "Start Time",
"dontAggregate": true
},
{
"key": "duration",
Expand Down
6 changes: 4 additions & 2 deletions core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,8 @@
"key": "startTime",
"valueType": "ms",
"granularity": 1,
"label": "Start Time"
"label": "Start Time",
"dontAggregate": true
},
{
"key": "duration",
Expand Down Expand Up @@ -3770,7 +3771,8 @@
"key": "cacheLifetimeMs",
"valueType": "ms",
"label": "Cache TTL",
"displayUnit": "duration"
"displayUnit": "duration",
"dontAggregate": true
},
{
"key": "totalBytes",
Expand Down
11 changes: 8 additions & 3 deletions report/renderer/details-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export class DetailsRenderer {
/**
* @param {DOM} dom
* @param {{
* fullPageScreenshot?: LH.Audit.Details.FullPageScreenshot,
* entityClassification?: LH.Audit.Details.EntityClassification,
* fullPageScreenshot?: LH.Result.FullPageScreenshot,
* entityClassification?: LH.Result.EntityClassification,
* }} [options]
*/
constructor(dom, options = {}) {
Expand Down Expand Up @@ -390,7 +390,12 @@ export class DetailsRenderer {
renderedRows[0]?.classList.add('lh-row--group');

const entityName = group.entity?.toString() || '';
const matchedEntity = this._entityClassification?.entities[entityName];
const entityIndex = this._entityClassification?.nameLUT[entityName];
/** @type {LH.Result.Entity|undefined} */
let matchedEntity;
if (typeof entityIndex !== 'undefined') {
matchedEntity = this._entityClassification?.entities[entityIndex];
}

if (matchedEntity?.category) {
const categoryChipEl = this._dom.createElement('span');
Expand Down

0 comments on commit 5b5bc80

Please sign in to comment.