@@ -49,8 +49,8 @@ export function patchRender (_Vue, stubs, stubAllComponents) {
49
49
// before they are rendered in shallow mode. We also need to ensure that
50
50
// component constructors were created from the _Vue constructor. If not,
51
51
// we must replace them with components created from the _Vue constructor
52
- // before calling the original $createElement. This ensures that the component
53
- // will have the correct instance properties and stubs when it renders .
52
+ // before calling the original $createElement. This ensures that components
53
+ // have the correct instance properties and stubs when they are rendered .
54
54
function patchRenderMixin ( ) {
55
55
const vm = this
56
56
@@ -69,18 +69,18 @@ export function patchRender (_Vue, stubs, stubAllComponents) {
69
69
70
70
if ( isConstructor ( el ) ) {
71
71
if ( stubAllComponents ) {
72
- const elem = createStubFromComponent (
72
+ const stub = createStubFromComponent (
73
73
el ,
74
74
el . name || 'anonymous'
75
75
)
76
- return originalCreateElement ( elem , ...args )
76
+ return originalCreateElement ( stub , ...args )
77
77
}
78
78
79
- if ( shouldExtend ( el , _Vue ) ) {
80
- return originalCreateElement ( extend ( el , _Vue ) , ... args )
81
- }
79
+ const Constructor = shouldExtend ( el , _Vue )
80
+ ? extend ( el , _Vue )
81
+ : el
82
82
83
- return originalCreateElement ( el , ...args )
83
+ return originalCreateElement ( Constructor , ...args )
84
84
}
85
85
86
86
if ( typeof el === 'string' ) {
0 commit comments