Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] v2.23.1 readOnly: true crashes the editor #1968

Closed
hlynurstef opened this issue Feb 9, 2022 · 2 comments · Fixed by #1969
Closed

[Bug] v2.23.1 readOnly: true crashes the editor #1968

hlynurstef opened this issue Feb 9, 2022 · 2 comments · Fixed by #1969
Assignees
Labels

Comments

@hlynurstef
Copy link

hlynurstef commented Feb 9, 2022

On version 2.23.1 when we create a new EditorJs instance with readOnly: true the editor crashes with the following error:

Cannot read properties of undefined (reading 'destroy')

This crash does not happen on v2.23.0

Steps to reproduce:

  1. Make sure you are on version 2.23.1 of @editorjs/editorjs
  2. Create an EditorJs instance with readOnly: true
  3. Observe the crash

I've created a reproducable example in codesandbox where you can toggle between readOnly true/false:
https://codesandbox.io/s/editorjs-readonly-crash-myw3o?file=/src/App.js

When readOnly is toggled to true you can observe the crash.

NOTE: This crash does not happen on v2.23.0

Expected behavior:
Not crashing

Screenshots:
image

Device, Browser, OS:
Chrome Version 98.0.4758.80 (Official Build) (arm64)

Editor.js version:
2.23.1

Plugins you use with their versions:
None

@hlynurstef hlynurstef added the bug label Feb 9, 2022
@neSpecc neSpecc self-assigned this Feb 9, 2022
neSpecc added a commit that referenced this issue Feb 9, 2022
neSpecc added a commit that referenced this issue Feb 9, 2022
* fix(readonly): fix readonly property

Resolves #1968

* changelog added

* Update CHANGELOG.md
@neSpecc
Copy link
Member

neSpecc commented Feb 9, 2022

Sorry. Fix was shipped with 2.23.2

@jimmycrequer
Copy link

@neSpecc Hello, I have the same error on 2.23.0-rc.2, it seems the fix wasn't applied on that branch can you please check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants