Selaa lähdekoodia

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

Evan You 9 vuotta sitten
vanhempi
commit
21d7ad65b5
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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))
         }