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

[CARE-1320] Fix - Editor crashing when there is a node with children: [] #412

Merged
merged 9 commits into from
May 17, 2023

Conversation

e1himself
Copy link
Contributor

@e1himself e1himself commented May 11, 2023

There is a built-in normalization in slate to make sure children arrays always have at least one child. However, it is not triggered for the initial render. And if for any reason it happens that a node with children: [] is saved to the database, there is no escape from it anymore.

This change makes sure that the initial value does comply with this constraint.

Related slate issue:

@e1himself e1himself self-assigned this May 11, 2023
@e1himself e1himself marked this pull request as draft May 11, 2023 13:09
@e1himself e1himself force-pushed the fix/care-1320-something-is-wrong-error branch from f84e890 to 4d82fde Compare May 11, 2023 14:07
@e1himself e1himself marked this pull request as ready for review May 15, 2023 08:26
@e1himself e1himself requested a review from mohammadxali May 15, 2023 08:26
@e1himself e1himself removed the request for review from mohammadxali May 15, 2023 08:32
@e1himself e1himself marked this pull request as draft May 15, 2023 08:32
@e1himself e1himself requested a review from mohammadxali May 16, 2023 12:16
@e1himself e1himself marked this pull request as ready for review May 16, 2023 12:16
@e1himself e1himself merged commit 2665075 into main May 17, 2023
@e1himself e1himself deleted the fix/care-1320-something-is-wrong-error branch May 17, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants