Skip to content

Commit

Permalink
Resolved issue with is_lcp_statically_discoverable (#148)
Browse files Browse the repository at this point in the history
Co-authored-by: Barry Pollard <[email protected]>
  • Loading branch information
kevinfarrugia and tunetheweb authored Nov 3, 2024
1 parent 929e2d3 commit 420b19b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function getRawLcpElement(rawDoc, lcpUrl) {
src = i.getAttribute('href');
}

return src == lcpUrl;
return new URL(src, location.href).href == lcpUrl;
});

// lcp_elem_stats will match the img, not the source.
Expand Down

0 comments on commit 420b19b

Please sign in to comment.