|
@@ -1,6 +1,6 @@
|
|
|
/* @flow */
|
|
/* @flow */
|
|
|
|
|
|
|
|
-import { extend, warn } from 'core/util/index'
|
|
|
|
|
|
|
+import { extend, warn, isObject } from 'core/util/index'
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Runtime helper for rendering <slot>
|
|
* Runtime helper for rendering <slot>
|
|
@@ -15,6 +15,12 @@ export function renderSlot (
|
|
|
if (scopedSlotFn) { // scoped slot
|
|
if (scopedSlotFn) { // scoped slot
|
|
|
props = props || {}
|
|
props = props || {}
|
|
|
if (bindObject) {
|
|
if (bindObject) {
|
|
|
|
|
+ if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) {
|
|
|
|
|
+ warn(
|
|
|
|
|
+ 'slot v-bind without argument expects an Object',
|
|
|
|
|
+ this
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
props = extend(extend({}, bindObject), props)
|
|
props = extend(extend({}, bindObject), props)
|
|
|
}
|
|
}
|
|
|
return scopedSlotFn(props) || fallback
|
|
return scopedSlotFn(props) || fallback
|