web icon indicating copy to clipboard operation
web copied to clipboard

fix(browser-logs): do not log nullish errors

Open pdesoyres-cc opened this issue 2 years ago • 1 comments

What I did

  1. Add a nullish condition on e.error before logging.

Why?

Because in some situations, the error in the event can be null.

This pollutes the browser log console. This pollutes the test logs (through the browser error reporter).

I faced that when trying to ignore some errors using this technique:

  • https://github.com/lit/lit/tree/main/packages/labs/virtualizer#resizeobserver-loop-limit-exceeded-errors
  • https://github.com/lit/lit/blob/main/packages/labs/virtualizer/src/support/resize-observer-errors.ts

pdesoyres-cc avatar Jan 10 '24 11:01 pdesoyres-cc

⚠️ No Changeset found

Latest commit: c868c3cdbdd2d65046d4e43bd391a04eb51e3ae0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jan 10 '24 11:01 changeset-bot[bot]