Skip to content

Commit 1dabda4

Browse files
lint fix
1 parent 26a9061 commit 1dabda4

File tree

1 file changed

+10
-7
lines changed
  • injected/src/features/breakage-reporting

1 file changed

+10
-7
lines changed

injected/src/features/breakage-reporting/utils.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function getJsPerformanceMetrics() {
1212

1313
/**
1414
* Convenience function to return an error object
15-
* @param {string} errorMessage
15+
* @param {string} errorMessage
1616
* @returns {ErrorObject}
1717
*/
1818
function returnError(errorMessage) {
@@ -34,12 +34,15 @@ export function getExpandedPerformanceMetrics() {
3434
const resources = /** @type {PerformanceResourceTiming[]} */ (performance.getEntriesByType('resource'));
3535

3636
// Find FCP
37-
const fcp = paint.find(p => p.name === 'first-contentful-paint');
37+
const fcp = paint.find((p) => p.name === 'first-contentful-paint');
3838

3939
// Get largest contentful paint if available
4040
let largestContentfulPaint = null;
41-
if (window.PerformanceObserver && PerformanceObserver.supportedEntryTypes &&
42-
PerformanceObserver.supportedEntryTypes.includes('largest-contentful-paint')) {
41+
if (
42+
window.PerformanceObserver &&
43+
PerformanceObserver.supportedEntryTypes &&
44+
PerformanceObserver.supportedEntryTypes.includes('largest-contentful-paint')
45+
) {
4346
const lcpEntries = performance.getEntriesByType('largest-contentful-paint');
4447
if (lcpEntries.length > 0) {
4548
largestContentfulPaint = lcpEntries[lcpEntries.length - 1].startTime;
@@ -80,13 +83,13 @@ export function getExpandedPerformanceMetrics() {
8083
// Additional metadata
8184
protocol: navigation.nextHopProtocol,
8285
redirectCount: navigation.redirectCount,
83-
navigationType: navigation.type
84-
}
86+
navigationType: navigation.type,
87+
},
8588
};
8689
}
8790

8891
return returnError('No navigation timing found');
8992
} catch (e) {
9093
return returnError('JavaScript execution error: ' + e.message);
9194
}
92-
}
95+
}

0 commit comments

Comments
 (0)