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: use includes over contains #1275

Merged
merged 1 commit into from
Jun 26, 2024
Merged

fix: use includes over contains #1275

merged 1 commit into from
Jun 26, 2024

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Jun 26, 2024

Changes

Use includes to check substring. contains is throwing a weird error as reported in #1272 (comment)

Before After
Screenshot 2024-06-26 at 11 20 36 Screenshot 2024-06-26 at 11 20 42
Before After
Screenshot 2024-06-26 at 11 20 16 Screenshot 2024-06-26 at 11 21 09

Copy link

vercel bot commented Jun 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Jun 26, 2024 10:19am

@daibhin daibhin added the bump patch Bump patch version when this PR gets merged label Jun 26, 2024
Copy link

Size Change: -18 B (0%)

Total Size: 1.04 MB

Filename Size Change
dist/array.full.js 246 kB -6 B (0%)
dist/recorder-v2.js 109 kB -6 B (-0.01%)
dist/recorder.js 109 kB -6 B (-0.01%)
ℹ️ View Unchanged
Filename Size
dist/array.js 143 kB
dist/es.js 143 kB
dist/exception-autocapture.js 10.4 kB
dist/module.js 144 kB
dist/surveys-module-previews.js 60.3 kB
dist/surveys.js 65 kB
dist/tracing-headers.js 8.26 kB
dist/web-vitals.js 5.79 kB

compressed-size-action

@daibhin daibhin merged commit dd90192 into main Jun 26, 2024
14 checks passed
@daibhin daibhin deleted the dn-fix/contains-to-includes branch June 26, 2024 10:25
});
+ if (!stylesheet && n.href.contains('.css')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not part of the mozilla spec at least https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String so probably depends on browser yeah

@pauldambra
Copy link
Member

Lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants