[bugfix] scopedSlots maybe undefined in lower vue version

This commit is contained in:
陈嘉涵 2019-02-14 19:46:27 +08:00
parent 7e774bcff2
commit 3931f32ae7

View File

@ -57,7 +57,7 @@ function install(this: ComponentOptions<Vue>, 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 => {