kommitters / editorjs-undo

Undo/Redo feature for Editor.js
https://www.npmjs.com/package/editorjs-undo
MIT License
169 stars 51 forks source link

Uncaught TypeError: Cannot read properties of undefined (reading 'holder') bug fixed #179 #190

Closed khanakia closed 1 year ago

ARH3 commented 1 year ago

Hello @miguelnietoa and @khanakia has this been added to the main codebase? I am seeing this same issue when I try to use this plugin.

edit: Looks like with the latest version (as opposed to the stable version) this issue is fixed! Please confirm if anything else to be aware of? Thanks!

miguelnietoa commented 1 year ago

@ARH3 I was unable not reproduce it... I think it's not an issue. Thank you.

Hey @khanakia, could you describe better how the error occurs? Please!

khanakia commented 1 year ago

It's related to editor.js default state and i could find this reference https://github.com/codex-team/editor.js/issues/2084 the same kind of issue was reported by many other users also but i could find this one.

So when you keep undoing and there is nothing to undo then it actually gives the error because undo tries to set the default state it was something like that i cannot remember it completely.

Also, there were many other bugs with undo the undo-redo does not work perfectly with components. So i forked the repo of editorjs-undo and customized the code to make it work because our core product is fully dependent of Editor.js so we could not wait to create a pull request and wait it to merge.