lexical
lexical copied to clipboard
Bug: Passing an empty ParagraphNode to $dfs incorrectly returns content from subsequent paragraphs
Lexical version: 0.14.5
Steps To Reproduce
- create empty ParagraphNode and following ParagraphNodes
- search empty paragraph with $dfs returns following paragraph nodes too
Link to code example: https://codesandbox.io/p/sandbox/icy-smoke-3j6p79
The current behavior
$dfs returns next paragraph contents when pass empty paragraph.
The expected behavior
$dfs returns only itself when pass empty paragraph.