Skip to content

Commit

Permalink
chore: improve
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Sep 2, 2024
1 parent f60d504 commit e149867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,12 +549,12 @@ export function createHydrationFunctions(
: (children[i] = normalizeVNode(children[i]))
const isText = vnode.type === Text
if (node) {
if (isText && !optimized && i + 1 < l) {
if (isText && !optimized) {
// #7285 possible consecutive text vnodes from manual render fns or
// JSX-compiled fns, but on the client the browser parses only 1 text
// node.
// look ahead for next possible text vnode
if (normalizeVNode(children[i + 1]).type === Text) {
if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
// create an extra TextNode on the client for the next vnode to
// adopt
insert(
Expand Down

0 comments on commit e149867

Please sign in to comment.