Skip to content

Commit e8d84ec

Browse files
Fix property 'at' does not exist error
1 parent c89725d commit e8d84ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/optimization-detective/detect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ export default async function detect( {
789789
elements: [],
790790
};
791791

792-
const lcpMetric = lcpMetricCandidates.at( -1 );
792+
const lcpMetric = lcpMetricCandidates[ lcpMetricCandidates.length - 1 ];
793793

794794
// Populate the elements in the URL Metric.
795795
for ( const elementIntersection of elementIntersections ) {

0 commit comments

Comments
 (0)