Pārlūkot izejas kodu

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

Evan You 9 gadi atpakaļ
vecāks
revīzija
21d7ad65b5
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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))
         }