Skip to content

Commit 498382c

Browse files
authored
Pass an empty object to scoped slots (#1660)
Match how the Vue runtime executes scoped slots. When a scoped slot accepts and immediately destructures its props, an error will get thrown if attempting to destructure a value that is `undefined`.
1 parent 8cc6654 commit 498382c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/create-instance/create-component-stubs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export function createStubFromComponent(
150150
? context.children
151151
: this.$options._renderChildren ||
152152
getScopedSlotRenderFunctions(this).map(x =>
153-
this.$options.parent._vnode.data.scopedSlots[x]()
153+
this.$options.parent._vnode.data.scopedSlots[x]({})
154154
)
155155
)
156156
}

0 commit comments

Comments
 (0)