Преглед изворни кода

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

Evan You пре 9 година
родитељ
комит
21d7ad65b5
1 измењених фајлова са 1 додато и 1 уклоњено
  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))
         }