Skip to content

Commit

Permalink
Closes #6552: Wrong type captured in DB
Browse files Browse the repository at this point in the history
The type was hardcoded as `img`, now it becomes dynamic and set by the `lcp-beacon.js` script.
  • Loading branch information
Miraeld committed Apr 16, 2024
1 parent 1c4062a commit 9aed6ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/Engine/Media/AboveTheFold/AJAX/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public function add_lcp_data() {
if ( 'lcp' === $image->label && 'not found' === $lcp ) {
// We should only get one LCP from the beacon.
$lcp = (object) [
'type' => 'img',
'type' => $image->type,
'src' => $image->src,
];
} elseif ( 'above-the-fold' === $image->label ) {
$viewport[] = (object) [
'type' => 'img',
'type' => $image->type,
'src' => $image->src,
];
}
Expand Down

0 comments on commit 9aed6ae

Please sign in to comment.