codex-team / codex-team/editor.js
[Bug] Cannot read property 'holder'/'tool' of undefined
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Describe a bug.
Steps to reproduce:
When trying to manually render data, I keep getting the following error:

Code looks as follows:
```
instance.render({ blocks: [] })}
tools={EDITOR_JS_TOOLS}
instanceRef={(instance) => (editor.current = instance)}
/>
```
Also tried the `useEffect` approach like this:
```
useEffect(() => {
if (editor.current && description) {
editor.current.isReady.then(() => {
editor.current.render({ blocks: description.blocks });
});
}
}, [editor.current, description]);
```
Please note: with `2.19.3` only the first error appears `Uncaught TypeError: Cannot read property 'holder' of undefined` but afterwards it is possible to focus the editor
Expected behavior:
Screenshots:

Device, Browser, OS:
Editor.js version: 2.20.2
Plugins you use with their versions:
react-editor-js: 1.9.0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.