rrweb
rrweb copied to clipboard
[Bug]: isCheckout会触发两次
Preflight Checklist
- [X] I have searched the issue tracker for a bug report that matches the one I want to file, without success.
What package is this bug report for?
rrweb
Version
v2.0.0-alpha.8
Expected Behavior
期望制作一次全量快照时,isCheckout只触发一次
Actual Behavior
最新版本,重新制作一次全量快照时,isCheckout触发了两次
Steps to Reproduce
重新制作一次全量快照时,isCheckout触发了两次
Testcase Gist URL
No response
Additional Information
No response
@Juice10
@wfk007
有人在看这个问题吗
@wensiyuanseven 能提供个可以复现问题的仓库不,我看一下
Me too
Version v2.0.0-alpha.10
Me too
Version v2.0.0-alpha.10
@chowkings can you provide a minimum git repository?
I only used translate on the OP but if I understand correctly, when we call takeFullSnapshot(true), we will receive two distinct events with the isCheckout arg as true. Looking at the blame this is due to #1141.
If you use checkoutEvery... and rely on isCheckout to reset existing events, this means that the Meta event will be lost because the FullSnapshot occurs afterwards, and isCheckout is true for both events. Losing the Meta event means that the replayer will be unable to set its dimensions, making the replay look broken.
cc @YunFeng0817
I only used translate on the OP but if I understand correctly, when we call
takeFullSnapshot(true), we will receive two distinct events with theisCheckoutarg astrue. Looking at the blame this is due to #1141.If you use
checkoutEvery...and rely onisCheckoutto reset existing events, this means that theMetaevent will be lost because theFullSnapshotoccurs afterwards, andisCheckoutis true for both events. Losing theMetaevent means that the replayer will be unable to set its dimensions, making the replay look broken.cc @YunFeng0817
v2.0.0-alpha.14 has same problem。
as the guide showed ,user can use isCheckout to distinguish event into different eventsMatrix。