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 d77473b commit 888db8eCopy full SHA for 888db8e
src/pages/_app.tsx
@@ -125,7 +125,7 @@ export function reportWebVitals(metrics: NextWebVitalsMetrics): void {
125
const { name } = metrics;
126
const count = globalWebVitalsMetric.reportedCount;
127
globalWebVitalsMetric.metrics[name] = metrics;
128
- const keysLength = Object.keys(globalWebVitalsMetric.metrics).length;
+ const keysLength = Object.keys(globalWebVitalsMetric.metrics)?.length;
129
130
// Temporise analytics API calls by waiting for at least 5 metrics to be received before sending the first report
131
// (because 3 metrics will be received upon initial page load, and then 2 more upon first click)
0 commit comments