Skip to content

calling renderFromHTML with empty string or blank tags causes crash when you click on the editor holder #1985

Open

Description

@luciancic

Describe a bug.

Just as the title says. This is the error you get:

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

Steps to reproduce:

  1. Go to my codesandbox to see a minimal reproduction of the error.
  2. Click on where the editor should be, in the browser window.
  3. Uncomment the other lines to see it fail with "" and see it pass with non-blank tags or non-blank strings.

Expected behavior:

The editor should render with no content.

Screenshots:
Screen Shot 2022-02-24 at 4 04 44 PM

Device, Browser, OS: macOS, codesandbox

Editor.js version: latest

Plugins you use with their versions: error happens independently from plugins

Activity

  1. luciancic commented on Feb 24, 2022

    @luciancic
    Author

    Probably related to #1841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions