Skip to content

Commit

Permalink
fix(runtime-core): fix empty fragment in runtime-core
Browse files Browse the repository at this point in the history
  • Loading branch information
Doctor-wu committed Jan 5, 2024
1 parent 0275dd3 commit b17fedd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,11 @@ function baseCreateRenderer(
// since they are either generated by the compiler, or implicitly created
// from arrays.
mountChildren(
n2.children as VNodeArrayChildren,
// #10007
// such fragment like `<></>` will be compiled into
// a fragment which doesn't have a children.
// In this case fallback to an empty array
(n2.children || []) as VNodeArrayChildren,
container,
fragmentEndAnchor,
parentComponent,
Expand Down

0 comments on commit b17fedd

Please sign in to comment.