kommitters / editorjs-undo

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

Uncaught TypeError: Cannot read properties of undefined (reading 'holder') #180

Closed khanakia closed 1 year ago

khanakia commented 1 year ago

Precheck

Description

When there is the last element to undo editor.js throws an error because of empty state. Please refer to this issue https://github.com/codex-team/editor.js/issues/2090

Environment

Current behavior

When there is the last element to undo editor.js throws an error because of empty state. Please refer to this issue https://github.com/codex-team/editor.js/issues/2090

https://user-images.githubusercontent.com/2174170/209191228-867814a2-9c63-4c2a-a3a7-ed96e999d500.mov

Expected behavior

It should not show the error.

Additional context

Add any other context about the problem here.

khanakia commented 1 year ago

I have created a pull request https://github.com/kommitters/editorjs-undo/pull/179

miguelnietoa commented 1 year ago

Fixed through #190 in version 2.0.19.

Thank you @khanakia for contributing!

miguelnietoa commented 1 year ago

Sorry! I forgot to include the bundle file so this issue is actually solved in version 2.0.20 👍🏻