Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions packages/create-instance/create-component-stubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,9 @@ function resolveOptions(component, _Vue) {
return {}
}

if (isConstructor(component)) {
return component.options
}
const options = _Vue.extend(component).options
component._Ctor = {}

return options
return isConstructor(component)
? component.options
: _Vue.extend(component).options
}

function getScopedSlotRenderFunctions(ctx: any): Array<string> {
Expand Down
1 change: 0 additions & 1 deletion packages/create-instance/create-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export default function createInstance(

// make sure all extends are based on this instance
const Constructor = _Vue.extend(componentOptions).extend(instanceOptions)
componentOptions._Ctor = {}
Constructor.options._base = _Vue

const scopedSlots = createScopedSlots(options.scopedSlots, _Vue)
Expand Down
1 change: 0 additions & 1 deletion packages/create-instance/patch-create-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function shouldExtend(component, _Vue) {
function extend(component, _Vue) {
const componentOptions = component.options ? component.options : component
const stub = _Vue.extend(componentOptions)
componentOptions._Ctor = {}
stub.options.$_vueTestUtils_original = component
stub.options._base = _Vue
return stub
Expand Down