1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 13:51:59 +02:00

Revert "Warn when normalization removes node ()" ()

This reverts commit 0ca31e74985cc15e81f941a34c00c10b88f2ca76.
This commit is contained in:
Dylan Schiemann 2022-01-07 23:21:54 +00:00 committed by GitHub
parent 4b2d4de4bf
commit cc9cba017a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 13 deletions
.changeset
packages/slate/src

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

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