From 1c7f4b6e13c5aeda84d9bd8049a9617ce43879b4 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Thu, 3 Aug 2023 10:02:16 +0200 Subject: [PATCH] Fix: Element timings without images was shown wrong. (#3927) https://github.com/sitespeedio/sitespeed.io/issues/3926 --- lib/plugins/html/templates/url/metrics/elementTimings.pug | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/plugins/html/templates/url/metrics/elementTimings.pug b/lib/plugins/html/templates/url/metrics/elementTimings.pug index 436a757c15..230047dbda 100644 --- a/lib/plugins/html/templates/url/metrics/elementTimings.pug +++ b/lib/plugins/html/templates/url/metrics/elementTimings.pug @@ -4,9 +4,8 @@ if browsertime.timings.elementTimings && Object.keys(browsertime.timings.element table tr th Id - if value.url !== '' - th URL - th Image + th URL + th Image th Tag th Render time th Load time @@ -21,6 +20,9 @@ if browsertime.timings.elementTimings && Object.keys(browsertime.timings.element td a(href=value.url) img.screenshot(src=value.url, alt='LCP', style='width:200px') + else + td + td td #{value.tagName} td #{h.time.ms(value.renderTime)} td #{h.time.ms(value.loadTime)}