From 054c2c3de2976c8f87b7a52980bc89c12d3d90ee Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 15 Apr 2016 15:35:47 -0400 Subject: [PATCH] fix attr merging --- src/runtime/instance/render.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/instance/render.js b/src/runtime/instance/render.js index 3893e08af..80b17bc1b 100644 --- a/src/runtime/instance/render.js +++ b/src/runtime/instance/render.js @@ -42,9 +42,10 @@ function resolveSlots (vm, children) { function mergeParentAttrs (vm, data, parentData) { if (parentData.attrs) { const props = vm.$options.props + const attrs = data.attrs || (data.attrs = []) for (let key in parentData.attrs) { if (!hasOwn(props, key)) { - data.attrs[key] = parentData.attrs[key] + attrs[key] = parentData.attrs[key] } } }