Cannot read properties of undefined (reading 'renderToElement')
boyanhtrai opened this issue · comments
Describe the bug
Cannot read properties of undefined (reading 'renderToElement')
To Reproduce
I just test on example link on https: //www.blocknotejs.org/docs/custom-schemas/custom-inline-content
Link bug example: https://stackblitz.com/github/TypeCellOS/BlockNote/tree/main/examples/05-custom-schema/02-suggestion-menus-mentions?file=App.tsx
version: ^0.13.2
Misc
- Node version: v20.11.0
- Package manager:
- Browser: chrome
Playing around with the example project I noticed the inline content example consistently crashes when switching between certain examples and not others (see clip below)
Screen.Recording.2024-05-30.at.16.30.17.mov
It seems contentComponent
on _tiptapEditor
is undefined
in some cases.
EDIT: Perhaps there's some race condition here. Sometimes the example with custom inline content renders and sometimes it crashes due to the error mentioned above.