We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 819d00e commit 4396196Copy full SHA for 4396196
packages/browser-utils/src/metrics/web-vitals/lib/LayoutShiftManager.ts
@@ -30,7 +30,8 @@ export class LayoutShiftManager {
30
if (entry.hadRecentInput) return;
31
32
const firstSessionEntry = this._sessionEntries[0];
33
- const lastSessionEntry = this._sessionEntries.at(-1);
+ // This previously used `this._sessionEntries.at(-1)` but that is ES2022. We support ES2021 and earlier.
34
+ const lastSessionEntry = this._sessionEntries[this._sessionEntries.length - 1];
35
36
// If the entry occurred less than 1 second after the previous entry
37
// and less than 5 seconds after the first entry in the session,
0 commit comments