We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de7a072 + 26a4b6b commit 39a4f7eCopy full SHA for 39a4f7e
src/utils/nodes.ts
@@ -23,7 +23,9 @@ export function findFirstTextblockChild(
23
export const isNodeEmpty = (node: Node) => {
24
const emptyChildren = findChildren(
25
node,
26
- (n) => (!n.isText && !n.isAtom && n.content.size === 0) || (n.isText && !n.textContent),
+ (n) =>
27
+ (!n.isText && !n.isAtom && n.content.size === 0 && n.type.name === 'paragraph') ||
28
+ (n.isText && !n.textContent),
29
true,
30
);
31
0 commit comments