Procházet zdrojové kódy

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

Evan You před 10 roky
rodič
revize
21d7ad65b5
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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))
         }