Skip to content

Commit

Permalink
Added blockContainer check to check list item change event
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlipski committed Nov 13, 2024
1 parent 90a5475 commit b1d0bb9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ const checkListItemBlockContent = createStronglyTypedTiptapNode({
editor.state.doc,
getPos()
);

if (beforeBlockContainerPos.node.type.name !== "blockContainer") {
throw new Error(
`Expected blockContainer node, got ${beforeBlockContainerPos.node.type.name}`
);
}

this.editor.commands.command(
updateBlockCommand(
this.options.editor,
Expand Down

0 comments on commit b1d0bb9

Please sign in to comment.