Skip to content

Commit 7a0dfd0

Browse files
committed
perf: cache result from functional ctx.slots() calls
1 parent 0e8560d commit 7a0dfd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/vdom/create-functional-component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function FunctionalRenderContext (
4949
this.parent = parent
5050
this.listeners = data.on || emptyObject
5151
this.injections = resolveInject(options.inject, parent)
52-
this.slots = () => resolveSlots(children, parent)
52+
this.slots = () => this.$slots || (this.$slots = resolveSlots(children, parent))
5353

5454
Object.defineProperty(this, 'scopedSlots', ({
5555
enumerable: true,

0 commit comments

Comments
 (0)