Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Add extra condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed May 28, 2021
1 parent 0611f24 commit d45c7da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/blocks/Text/extensions/normalizeBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ export const normalizeBlocks = (editor) => {
[parent] = Editor.parent(editor, path);
}
} catch (e) {
// eslint-disable-next-line
console.log('error in getting parent', node);
}

// if the node is child in a list, but it's not a list node, lift the node
if (
slate.listTypes.includes(parent.type) &&
!listElements.includes(node.type)
!listElements.includes(node.type) &&
Element.isElement(node)
) {
Transforms.liftNodes(editor, { at: path });
// Transforms.wrapNodes(
Expand Down

0 comments on commit d45c7da

Please sign in to comment.