From 063e7ced16f739f1d187717367e37b613b2252f3 Mon Sep 17 00:00:00 2001 From: Cameron Stitt Date: Mon, 12 Aug 2019 15:45:35 +1000 Subject: [PATCH] Pass context down to slot creation --- src/compiler/compile/render_dom/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts index 8d4d24c38b..37684d984c 100644 --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -468,7 +468,8 @@ export default function dom( if (options.props) { for (const key in options.props.$$slots) { - this.$$.slotted[key] = options.props.$$slots[key][0](); + const ctx = options.props.$$scope ? options.props.$$scope.ctx : {}; + this.$$.slotted[key] = options.props.$$slots[key][0](ctx); this.$$.slotted[key].c(); } ${(props.length > 0 || uses_props) && deindent`