Skip to content

Commit

Permalink
fix: throw error when use slot at template
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Oct 22, 2019
1 parent 600f2db commit 041839b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/_util/props-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 041839b

Please sign in to comment.