-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Address more flaky collab tests #5788
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4addc31
to
25d5f5f
Compare
25d5f5f
to
754d572
Compare
754d572
to
6f73af5
Compare
// If there was a collision on the top level paragraph | ||
// we need to re-add a paragraph | ||
if ($getRoot().getChildrenSize() === 0) { | ||
$getRoot().append($createParagraphNode()); | ||
} |
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.
I had to bang my head against the wall for a very long time to figure out that this would fix the issue. I haven't read enough yjs and syncEvent code to figure out why it's doing the wrong thing (and that it's timing dependent!), but I don't see the harm in making sure that the editor doesn't become completely empty (since this code ran anyway under a more limited set of conditions).
General improvements to the reliability of collab tests