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

ref(browser): Refactor sending client reports w. fetch fallback #4008

Merged
merged 2 commits into from Sep 27, 2021

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Sep 24, 2021

getNativeFetchImplementation has been moved out of FetchTransport and added cache check to optimize it for use in multiple places. Other than that, no changes to it or to FetchTransport were done.

Fixes #4006

ref: vercel/next.js#23856
ref: https://github.com/vercel/next.js/pull/26601/files
ref: https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch

@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.32 KB (+0.01% 🔺)
@sentry/browser - Webpack 23.3 KB (0%)
@sentry/react - Webpack 23.33 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.77 KB (0%)


if (hasSendBeacon) {
// Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
const sendBeacon = global.navigator.sendBeacon.bind(global.navigator);
Copy link
Member

Choose a reason for hiding this comment

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

lol

Should we also wrap in a try catch just in case?

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.

6.13.2 Introduces Illegal invocation error on global navigator
3 participants