Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ecce2e

Browse filesBrowse files
kuitoseddyerburgh
authored andcommitted
fix: make component construct correctly which class extends from Vue (#654)
1 parent c0b2101 commit 3ecce2e
Copy full SHA for 3ecce2e

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎flow/vue.flow.js

Copy file name to clipboardExpand all lines: flow/vue.flow.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
// Importing these types declares them, so they are available globally
44

5-
declare type Component = Object // eslint-disable-line no-undef
5+
declare type Component = Object | Function // eslint-disable-line no-undef
66
declare type VNode = Object // eslint-disable-line no-undef
77
declare type SlotValue = Component | string | Array<Component> | Array<string>

‎packages/create-instance/create-instance.js

Copy file name to clipboardExpand all lines: packages/create-instance/create-instance.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function createInstance (
5555

5656
addEventLogger(vue)
5757

58-
const Constructor = vue.extend(component)
58+
const Constructor = (typeof component === 'function' && component.prototype instanceof Vue) ? component : vue.extend(component)
5959

6060
const instanceOptions = { ...options, propsData: { ...options.propsData }}
6161
deleteoptions(instanceOptions)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.