lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Bug: Passing an empty ParagraphNode to $dfs incorrectly returns content from subsequent paragraphs

Open matsuyama-k1 opened this issue 1 year ago • 0 comments

Lexical version: 0.14.5

Steps To Reproduce

  1. create empty ParagraphNode and following ParagraphNodes
  2. 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. Screenshot 2024-04-27 at 18 35 11

The expected behavior

$dfs returns only itself when pass empty paragraph.

matsuyama-k1 avatar Apr 27 '24 09:04 matsuyama-k1