diff --git a/flow/vue.flow.js b/flow/vue.flow.js index d7a51d41f..77b9503c0 100644 --- a/flow/vue.flow.js +++ b/flow/vue.flow.js @@ -2,6 +2,6 @@ // Importing these types declares them, so they are available globally -declare type Component = Object // eslint-disable-line no-undef +declare type Component = Object | Function // eslint-disable-line no-undef declare type VNode = Object // eslint-disable-line no-undef declare type SlotValue = Component | string | Array | Array diff --git a/packages/create-instance/create-instance.js b/packages/create-instance/create-instance.js index 3b807ab7d..c898222f3 100644 --- a/packages/create-instance/create-instance.js +++ b/packages/create-instance/create-instance.js @@ -55,7 +55,7 @@ export default function createInstance ( addEventLogger(vue) - const Constructor = vue.extend(component) + const Constructor = (typeof component === 'function' && component.prototype instanceof Vue) ? component : vue.extend(component) const instanceOptions = { ...options, propsData: { ...options.propsData }} deleteoptions(instanceOptions)