Skip to content

Error: Cannot read properties of null (reading 'updateOuterDeco') #532

@thales-fukuda

Description

@thales-fukuda

Bug description

While running the example presented on the README for this project in dev mode, the code threw the error below.

I tried to use the use-editor hook provided by Tiptap instead of the custom one for this project and the code ran well. I think the problem may be related to the fact that while hot-reloading, Tiptap tries to access a destroyed editor.

The use-editor hook was written more than a year ago, and since then Tiptap had multiple updates. Specifically, ueberdosis/tiptap#4000 might be related to it.

Error:

Cannot read properties of null (reading 'updateOuterDeco')
TypeError: Cannot read properties of null (reading 'updateOuterDeco')
    at EditorView.updateStateInner (http://localhost:3000/static/js/bundle.js:99248:24)
    at EditorView.update (http://localhost:3000/static/js/bundle.js:99181:10)
    at EditorView.setProps (http://localhost:3000/static/js/bundle.js:99193:10)
    at Editor.createNodeViews (http://localhost:3000/static/js/bundle.js:57999:15)
    at PureEditorContent.init (http://localhost:3000/static/js/bundle.js:62223:14)
    at PureEditorContent.componentDidMount (http://localhost:3000/static/js/bundle.js:62204:10)
    at invokeLayoutEffectMountInDEV (http://localhost:3000/static/js/bundle.js:36371:26)
    at invokeEffectsInDev (http://localhost:3000/static/js/bundle.js:38289:15)
    at commitDoubleInvokeEffectsInDEV (http://localhost:3000/static/js/bundle.js:38270:9)
    at flushPassiveEffectsImpl (http://localhost:3000/static/js/bundle.js:38045:9)

Version information:

Package version: 2.1.3
React: 18.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions