-
Notifications
You must be signed in to change notification settings - Fork 296
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
Improve incremental document update #4277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I will followup with a minor changes, but this is a great start
reason: undefined, | ||
}) | ||
|
||
if (contentChanges) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will always be true even if contentChanges is empty right? Cause Boolean([])
returns true
?
Will need to update to:
if (contentChanges) { | |
if (contentChanges?.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha, I was just opening this PR to make the same comment, will fix in a followup PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR #4277 was a lesson that we have very brittle code around dealing with document synchronization. This PR is an attempt to improve code health by - Adding tests! - Being more rigorous with null handling - Making the code a bit easier to follow (hopefully)
Test plan
In a client: