Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cwv): lcp and cls collection feature parity with 1.x #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion modules/fflags.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const fflags = {
enabled: (flag, callback) => fflags.has(flag) && callback(),
/* c8 ignore next */
disabled: (flag, callback) => !fflags.has(flag) && callback(),
eagercwv: [683],
redirect: [620, 1139],
example: [543, 770, 1136],
language: [543, 959, 1139, 620],
Expand Down
5 changes: 1 addition & 4 deletions modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@
['FID', 'INP', 'TTFB', 'CLS', 'LCP'].forEach((metric) => {
const metricFn = window.webVitals[`on${metric}`];
if (typeof metricFn === 'function') {
let opts = {};
fflags.enabled('eagercwv', () => {
opts = { reportAllChanges: isEager(metric) };
});
const opts = isEager(metric) ? { reportAllChanges: true } : undefined;

Check warning on line 96 in modules/index.js

View check run for this annotation

Codecov / codecov/patch

modules/index.js#L96

Added line #L96 was not covered by tests
metricFn(storeCWV, opts);
}
});
Expand Down
Loading