diff --git a/components/_util/props-util.js b/components/_util/props-util.js index 0016073d87..f1d9a6b1f8 100644 --- a/components/_util/props-util.js +++ b/components/_util/props-util.js @@ -137,7 +137,9 @@ const getComponentFromProp = (instance, prop, options = instance, execute = true const componentOptions = instance.componentOptions || {}; (componentOptions.children || []).forEach(child => { if (child.data && child.data.slot === prop) { - delete child.data.attrs.slot; + if (child.data.attrs) { + delete child.data.attrs.slot; + } if (child.tag === 'template') { slotsProp.push(child.children); } else {