From e09fd93e59dbae5bca9da7def6ddafc6beda9987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20K=C3=BChn?= Date: Mon, 13 Dec 2021 13:33:13 +0100 Subject: [PATCH] fix: check for invalid content in `insertContentAt` command --- packages/core/src/commands/insertContentAt.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/commands/insertContentAt.ts b/packages/core/src/commands/insertContentAt.ts index ba84b50d1..d94a88e40 100644 --- a/packages/core/src/commands/insertContentAt.ts +++ b/packages/core/src/commands/insertContentAt.ts @@ -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