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

🐛 [RUMF-834] fix loop direction #714

Merged
merged 3 commits into from
Feb 4, 2021

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Feb 3, 2021

Motivation

When importing rrweb code, I made a typo and index-- became index += 1.

ecc09e7#diff-7e32def6242fea74b49dc8381d38f18941e632957f7cea33951a0ecb07597705L280-R281

It should fix the "Cannot read property 'value' of null" and "Position outside of list" errors

Changes

Restore loop direction!

Testing


I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner February 3, 2021 17:09
@@ -281,7 +281,7 @@ export class MutationBuffer {
}
}
if (!node) {
for (let index = addList.length - 1; index >= 0; index += 1) {
for (let index = addList.length - 1; index >= 0; index -= 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

could it be a good opportunity to add a test?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll see what I can do

Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

LGTM

@BenoitZugmeyer BenoitZugmeyer merged commit d7fe6ee into master Feb 4, 2021
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/fix-rrweb-mutation-issue branch February 4, 2021 09:39
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.

3 participants