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

Better error handling for useBlockNote #342

Closed
infinite-persistence opened this issue Sep 20, 2023 · 0 comments · Fixed by #609
Closed

Better error handling for useBlockNote #342

infinite-persistence opened this issue Sep 20, 2023 · 0 comments · Fixed by #609
Labels
bug Something isn't working

Comments

@infinite-persistence
Copy link

infinite-persistence commented Sep 20, 2023

Describe the bug
useBlockNote currently throws an error when the given initialContent is not kosher.
Handling the error is cumbersome since effects can't be called conditionally. However, it seems like an ErrorBoundary HOC can be a workaround to suppress the error.

image

To Reproduce
Pass a non-json value to initialContent, e.g. initialContent: "abc".
This could come from corrupted saved data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant