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(tracing): Add check for document.scripts in metrics #3766

Merged
merged 2 commits into from
Jun 30, 2021

Conversation

AbhiPrasad
Copy link
Member

Fixes #3705

Supersedes #3707

We should check if document.scripts exists as it does not exist in some browser environments. This patch also refactors the document logic to rely on global.document instead of document.

Fixes #3705

Supersedes #3707

We should check if document.scripts exists as it does not exist in some
browser environments. This patch also refactors the document logic
to rely on `global.document` instead of `document`.
@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 21.39 KB (0%)
@sentry/browser - Webpack 22.4 KB (0%)
@sentry/react - Webpack 22.44 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.89 KB (+0.02% 🔺)

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) June 30, 2021 11:24
@AbhiPrasad AbhiPrasad merged commit 5289d40 into master Jun 30, 2021
@AbhiPrasad AbhiPrasad deleted the abhi-document-scripts branch June 30, 2021 11:35
1999 added a commit to 1999/sentry-javascript that referenced this pull request Jun 30, 2021
…transport

* upstream/master:
  fix(tracing): Add check for document.scripts in metrics (getsentry#3766)
  ref(nextjs): Stop setting redundant `productionBrowserSourceMaps` in config (getsentry#3765)
  test: Ensure withScope and run bubble up exceptions (getsentry#3764)
  ref(gatsby): Default release to empty string (getsentry#3759)
  fix(nextjs): Make `withSentryConfig` return type match given config type (getsentry#3760)
  misc: Fix typos (getsentry#3763)
  fix(node): Enable autoSessionTracking correctly (getsentry#3758)
  release: 6.8.0
  meta: 6.8.0 changelog
  feat: Enable serialization of multiple DOM attributes for breadcrumbs. (getsentry#3755)
  ref: Leave only valid buffer implementation (getsentry#3744)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There are not 'document.scripts' in mini-program environment
2 participants