Skip to content

Commit

Permalink
Revert "Warn when normalization removes node (#4769)" (#4776)
Browse files Browse the repository at this point in the history
This reverts commit 0ca31e7.
  • Loading branch information
dylans authored Jan 7, 2022
1 parent 4b2d4de commit cc9cba0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions .changeset/wild-penguins-shout.md

This file was deleted.

8 changes: 0 additions & 8 deletions packages/slate/src/create-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit cc9cba0

Please sign in to comment.