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

🐛 fallback to xhr when sendBeacon throws #796

Merged
merged 3 commits into from
Apr 19, 2021
Merged

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Apr 15, 2021

Motivation

From the spec, sendBeacon can throw TypeError.
cf #794

Changes

Fallback to xhr when sendBeacon throws

Testing

unit


I have gone over the contributing documentation.

@bcaudan bcaudan requested a review from a team as a code owner April 15, 2021 16:18
Copy link

@felipeplets felipeplets left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

packages/core/src/transport/transport.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2021

Codecov Report

Merging #796 (e3aa129) into master (f92eeb6) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #796      +/-   ##
==========================================
- Coverage   86.82%   86.73%   -0.09%     
==========================================
  Files          77       77              
  Lines        3642     3649       +7     
  Branches      828      829       +1     
==========================================
+ Hits         3162     3165       +3     
- Misses        480      484       +4     
Impacted Files Coverage Δ
packages/core/src/transport/transport.ts 92.30% <100.00%> (+0.55%) ⬆️
packages/rum-core/src/transport/batch.ts 62.85% <0.00%> (-11.43%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f92eeb6...e3aa129. Read the comment docs.

@bcaudan bcaudan merged commit d82d91a into master Apr 19, 2021
@bcaudan bcaudan deleted the bcaudan/catch-sendBeacon branch April 19, 2021 09:36
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.

4 participants