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: fixes several cases where we access an undefined value #171

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Mar 25, 2024

Fixes several cases where we access an undefined value.

In the case of lastFullSnapshotEvent, it can be undefined if we receive an incremental event before a full snapshot. This can happen, for example, if a user refreshes while canvas worker is working and on reload it finishes to call the mutation callback and before fullsnapshot occurs.

Fixes JAVASCRIPT-2S3R
Fixes JAVASCRIPT-2QS1
Fixes JAVASCRIPT-2FQ5
Fixes JAVASCRIPT-2H2H

Copy link

github-actions bot commented Mar 25, 2024

size-limit report 📦

Path Size
rrweb - record only (gzipped) 16.75 KB (+0.02% 🔺)
rrweb - record & CanvasManager only (gzipped) 19.41 KB (+0.02% 🔺)
rrweb - record only (min) 57.14 KB (+0.01% 🔺)
rrweb - record with treeshaking flags (gzipped) 15.54 KB (+0.04% 🔺)

@billyvg billyvg changed the title fix: lastFullSnapshotEvent can be undefined fix: fixes several cases where we access an undefined value Mar 25, 2024
@billyvg billyvg force-pushed the fix-lastfulltimestampevent-undefined branch from f45938d to 5666910 Compare March 25, 2024 19:35
@billyvg billyvg requested a review from a team March 25, 2024 23:05
@billyvg billyvg marked this pull request as ready for review March 25, 2024 23:05
Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

nice one!

@billyvg billyvg merged commit fc65eaa into sentry-v2 Mar 26, 2024
14 checks passed
@billyvg billyvg deleted the fix-lastfulltimestampevent-undefined branch March 26, 2024 22:23
billyvg added a commit that referenced this pull request Apr 26, 2024
Fixes several cases where we access an undefined value.

In the case of `lastFullSnapshotEvent`, it can be undefined if we
receive an incremental event before a full snapshot. This can happen,
for example, if a user refreshes while canvas worker is working and on
reload it finishes to call the mutation callback and before fullsnapshot
occurs.

Fixes JAVASCRIPT-2S3R
Fixes JAVASCRIPT-2QS1
Fixes JAVASCRIPT-2FQ5
Fixes JAVASCRIPT-2H2H
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.

2 participants