From 3931f32ae7c41eb5cd31718bf16861ab1026d390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 14 Feb 2019 19:46:27 +0800 Subject: [PATCH] [bugfix] scopedSlots maybe undefined in lower vue version --- packages/utils/use/sfc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/use/sfc.ts b/packages/utils/use/sfc.ts index c1fc6be35..6af3bd09f 100644 --- a/packages/utils/use/sfc.ts +++ b/packages/utils/use/sfc.ts @@ -57,7 +57,7 @@ function install(this: ComponentOptions, Vue: VueConstructor) { // unify slots & scopedSlots export function unifySlots(context: RenderContext) { - const { scopedSlots } = context; + const { scopedSlots = {} } = context; const slots = context.slots(); Object.keys(slots).forEach(key => {