1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-09 00:36:41 +02:00

Revert "Warn when normalization removes node (#4769)" (#4776)

This reverts commit 0ca31e7498.
This commit is contained in:
Dylan Schiemann
2022-01-07 23:21:54 +00:00
committed by GitHub
parent 4b2d4de4bf
commit cc9cba017a
2 changed files with 0 additions and 13 deletions

View File

@@ -1,5 +0,0 @@
---
'slate': patch
---
Warn when normalization removes node

View File

@@ -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)) {