kommitters / editorjs-undo

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

TypeError: can't access property "type", t[i] is undefined in Next.js #156

Closed eiiot closed 1 year ago

eiiot commented 1 year ago

Precheck

Description

I'm getting a weird error when using this component with NextJS. The page crashes, but is fixed after reloading, and doesn't appear for a while? It seems to be random. Possibly a SSR issue?

Environment

Current behavior


Unhandled Runtime Error

TypeError: can't access property "type", t[i] is undefined
Call Stack
value
node_modules/editorjs-undo/dist/bundle.js (1:6033)
value/<
node_modules/editorjs-undo/dist/bundle.js (1:5490)```

### Expected behavior

The page doesn't crash.
psalchow commented 1 year ago

We get the same error from time to time but cannot reproduce it.

psalchow commented 1 year ago

Added PR #175

miguelnietoa commented 1 year ago

Hi there!

Bug solved in the version v2.0.15, thanks @eIiot for reporting, and @psalchow for contributing! ✌🏻