File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
test/unit/features/global-api Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,13 @@ export function resolveConstructorOptions (Ctor: Class<Component>) {
66
66
if ( Ctor . super ) {
67
67
const superOptions = Ctor . super . options
68
68
const cachedSuperOptions = Ctor . superOptions
69
+ const extendOptions = Ctor . extendOptions
69
70
if ( superOptions !== cachedSuperOptions ) {
70
71
// super option changed
71
72
Ctor . superOptions = superOptions
72
- options = Ctor . options = mergeOptions ( superOptions , Ctor . extendOptions )
73
+ extendOptions . render = options . render
74
+ extendOptions . staticRenderFns = options . staticRenderFns
75
+ options = Ctor . options = mergeOptions ( superOptions , extendOptions )
73
76
if ( options . name ) {
74
77
options . components [ options . name ] = Ctor
75
78
}
Original file line number Diff line number Diff line change @@ -56,4 +56,18 @@ describe('Global API: mixin', () => {
56
56
57
57
expect ( vm . $el . textContent ) . toBe ( 'hi' )
58
58
} )
59
+
60
+ // vue-loader#433
61
+ it ( 'should not drop late-set render functions' , ( ) => {
62
+ const Test = Vue . extend ( { } )
63
+ Test . options . render = h => h ( 'div' , 'hello' )
64
+
65
+ Vue . mixin ( { } )
66
+
67
+ const vm = new Vue ( {
68
+ render : h => h ( Test )
69
+ } ) . $mount ( )
70
+
71
+ expect ( vm . $el . textContent ) . toBe ( 'hello' )
72
+ } )
59
73
} )
You can’t perform that action at this time.
0 commit comments