Check that Browsertime got CLS metrics before we try to render. (#3650)

https://github.com/sitespeedio/sitespeed.io/issues/3649
This commit is contained in:
Peter Hedenskog 2022-05-11 14:44:22 +02:00 committed by GitHub
parent 4a9e24e9bf
commit 738995015b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -142,10 +142,11 @@ if browsertime
td
a(href='#largestContentfulPaint') Largest Contentful Paint (LCP)
td.number #{h.time.ms(Math.max(timings.largestContentfulPaint.loadTime,timings.largestContentfulPaint.renderTime, timings.largestContentfulPaint.loadTime,timings.largestContentfulPaint.loadTime))}
tr
td
a(href='#cumulativeLayoutShift') Cumulative Layout Shift (CLS)
td.number #{browsertime.pageinfo.cumulativeLayoutShift.toFixed(2)}
if (browsertime.pageinfo && browsertime.pageinfo.cumulativeLayoutShift)
tr
td
a(href='#cumulativeLayoutShift') Cumulative Layout Shift (CLS)
td.number #{browsertime.pageinfo.cumulativeLayoutShift.toFixed(2)}
if browsertime.timings.firstInput !== undefined
tr
td