From cc9cba017a3abc998de06cc0a3d15a6a0bd47100 Mon Sep 17 00:00:00 2001 From: Dylan Schiemann Date: Fri, 7 Jan 2022 23:21:54 +0000 Subject: [PATCH] Revert "Warn when normalization removes node (#4769)" (#4776) This reverts commit 0ca31e74985cc15e81f941a34c00c10b88f2ca76. --- .changeset/wild-penguins-shout.md | 5 ----- packages/slate/src/create-editor.ts | 8 -------- 2 files changed, 13 deletions(-) delete mode 100644 .changeset/wild-penguins-shout.md diff --git a/.changeset/wild-penguins-shout.md b/.changeset/wild-penguins-shout.md deleted file mode 100644 index ff78829fd..000000000 --- a/.changeset/wild-penguins-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'slate': patch ---- - -Warn when normalization removes node diff --git a/packages/slate/src/create-editor.ts b/packages/slate/src/create-editor.ts index 59ff2324d..b1a903b5e 100644 --- a/packages/slate/src/create-editor.ts +++ b/packages/slate/src/create-editor.ts @@ -227,14 +227,6 @@ export const createEditor = (): Editor => { // other inline nodes, or parent blocks that only contain inlines and // text. if (isInlineOrText !== shouldHaveInlines) { - // eslint-disable-next-line no-console - console.warn( - `Removing ${ - isInlineOrText ? 'inline' : 'block' - } node at path ${path.concat(n)} because parent expects ${ - shouldHaveInlines ? 'inline' : 'block' - } children` - ) Transforms.removeNodes(editor, { at: path.concat(n), voids: true }) n-- } else if (Element.isElement(child)) {