Enhancement: only Vue.extend() non-VueConstructor arguments

This commit is contained in:
Ralph Schindler
2022-05-23 13:23:49 -05:00
committed by Dominik
parent 5fef431d09
commit 9cdd0eb3b3

View File

@@ -5,7 +5,7 @@ export class VueRenderer {
ref!: Vue
constructor(component: Vue | VueConstructor, props: any) {
const Component = Vue.extend(component)
const Component = (typeof component === 'function') ? component : Vue.extend(component)
this.ref = new Component(props).$mount()
}