Explorar o código

filter out empty strings when normalizing children (fix SSR match when containing text is empty)

Evan You %!s(int64=9) %!d(string=hai) anos
pai
achega
21d7ad65b5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/vdom/helpers.js

+ 1 - 1
src/core/vdom/helpers.js

@@ -31,7 +31,7 @@ export function normalizeChildren (
       } else if (isPrimitive(c)) {
         if (last && last.text) {
           last.text += String(c)
-        } else {
+        } else if (c !== '') {
           // convert primitive to vnode
           res.push(createTextVNode(c))
         }