Skip to content

Commit

Permalink
fix: check for invalid content in insertContentAt command
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Kühn authored and Philipp Kühn committed Dec 13, 2021
1 parent 170ec4b commit e09fd93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/commands/insertContentAt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export const insertContentAt: RawCommands['insertContentAt'] = (position, value,
: [content]

nodes.forEach(node => {
// check if added node is valid
node.check()

isOnlyBlockContent = isOnlyBlockContent
? node.isBlock
: false
Expand Down

0 comments on commit e09fd93

Please sign in to comment.