Skip to content

[Bug] Trying to merge two blocks that don't have a merge method #1415

@neSpecc

Description

@neSpecc

In 2.18 release there was a mistake with adding a public access modifier to the block.mergeable getter.

image

And now, it is a public method instead of a getter. As a result, trying to press Backspace between two same blocks (that don't have a merge method) occurs an error:

Unhandled Promise Rejection: TypeError: this.tool.merge is not a function. (In 'this.tool.merge(data)', 'this.tool.merge' is undefined)

Steps to reproduce:

  1. Go to example.html
  2. Make to List blocks
  3. Place the caret at the beginning of the second List
  4. Press Backspace
  5. You'll see an error

Expected behavior:

Error is not thrown.

Editor.js version:

2.19

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions