Skip to content

Commit 70b553b

Browse files
authoredMar 25, 2020
fix(create-instance): revert stubbing of component _Ctor (#1479)
1 parent 4df7619 commit 70b553b

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed
 

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

+3-7
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,9 @@ function resolveOptions(component, _Vue) {
8686
return {}
8787
}
8888

89-
if (isConstructor(component)) {
90-
return component.options
91-
}
92-
const options = _Vue.extend(component).options
93-
component._Ctor = {}
94-
95-
return options
89+
return isConstructor(component)
90+
? component.options
91+
: _Vue.extend(component).options
9692
}
9793

9894
function getScopedSlotRenderFunctions(ctx: any): Array<string> {

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

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export default function createInstance(
9393

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

9998
const scopedSlots = createScopedSlots(options.scopedSlots, _Vue)

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

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ function shouldExtend(component, _Vue) {
2121
function extend(component, _Vue) {
2222
const componentOptions = component.options ? component.options : component
2323
const stub = _Vue.extend(componentOptions)
24-
componentOptions._Ctor = {}
2524
stub.options.$_vueTestUtils_original = component
2625
stub.options._base = _Vue
2726
return stub

0 commit comments

Comments
 (0)
Please sign in to comment.