core icon indicating copy to clipboard operation
core copied to clipboard

fix(compiler-core): prevent root comments from blocking static node hoisting

Open alex-snezhko opened this issue 5 months ago • 5 comments

Fixes #13344

Filter out the comment children for the hoisting logic of the root template node, resulting in the non-comment child receiving the hoisted properties.

Summary by CodeRabbit

  • Tests

    • Added a new test to verify correct handling of static prop hoisting when the root contains a single element and comments.
  • Refactor

    • Improved logic to better detect a single element root by ignoring comment nodes, ensuring more accurate processing in templates.

alex-snezhko avatar May 17 '25 07:05 alex-snezhko