Explorar o código

do not add list key to text nodes (fix #3810)

Evan You %!s(int64=9) %!d(string=hai) anos
pai
achega
f1e37f6002
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

@@ -35,7 +35,7 @@ export function normalizeChildren (
             applyNS(c, ns)
           }
           // default key for nested array children (likely generated by v-for)
-          if (c.key == null && nestedIndex != null) {
+          if (c.tag && c.key == null && nestedIndex != null) {
             c.key = `__vlist_${nestedIndex}_${i}__`
           }
           res.push(c)