Skip to content

Commit

Permalink
Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
tunetheweb committed Nov 6, 2024
1 parent 930aad0 commit e0dac4b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/attribution/onCLS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
ReportOpts,
} from '../types.js';

// A reference to the LCP Target node incase it is removed before reporting
// A reference to the layout shift target node incase it is removed before reporting
const layoutShiftTargetMap: WeakMap<LayoutShift, Node | undefined> =
new WeakMap();

Expand All @@ -50,7 +50,7 @@ const attributeCLS = (metric: CLSMetric): CLSMetricWithAttribution => {
if (largestSource) {
attribution = {
largestShiftTarget: getSelector(
largestSource.node || layoutShiftTargetMap.get(largestEntry),
largestSource.node ?? layoutShiftTargetMap.get(largestEntry),
),
largestShiftTime: largestEntry.startTime,
largestShiftValue: largestEntry.value,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/onCLS-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ describe('onCLS()', async function () {
});

it('reports the target (reportAllChanges === true)', async function () {
// We can't guarantee the orer or reporting removed targets with
// We can't guarantee the order or reporting removed targets with
// reportAllChanges so don't even try. Just test the target without
// removal to compare to previous test
if (!browserSupportsCLS) this.skip();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/onINP-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ describe('onINP()', async function () {
});

it('includes target (reportAllChanges === true)', async function () {
// We can't guarantee the orer or reporting removed targets with
// We can't guarantee the order or reporting removed targets with
// reportAllChanges so don't even try. Just test the target without
// removal to compare to previous test
if (!browserSupportsLoAF) this.skip();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/onLCP-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ describe('onLCP()', async function () {
});

it('reports the target (reportAllChanges === true)', async function () {
// We can't guarantee the orer or reporting removed targets with
// We can't guarantee the order or reporting removed targets with
// reportAllChanges so don't even try. Just test the targets without
// removal to compare to previous test
if (!browserSupportsLCP) this.skip();
Expand Down

0 comments on commit e0dac4b

Please sign in to comment.