File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ strats.activate = function (parentVal, childVal) {
149149 */
150150
151151function mergeAssets ( parentVal , childVal ) {
152- var res = Object . create ( parentVal )
152+ var res = Object . create ( parentVal || null )
153153 return childVal
154154 ? extend ( res , guardArrayAssets ( childVal ) )
155155 : res
Original file line number Diff line number Diff line change @@ -282,10 +282,9 @@ describe('Util - Option merging', function () {
282282 var f1 = function ( ) { }
283283 var f2 = function ( ) { }
284284 var f3 = function ( ) { }
285- var componentA = function ( ) { }
286- componentA . options = { template : 'foo' , methods : { f1 : f1 , f2 : function ( ) { } } }
287- var componentB = { extends : componentA , methods : { f2 : f2 } }
288- var componentC = { extends : componentB , template : 'bar' , methods : { f3 : f3 } }
285+ var componentA = Vue . extend ( { template : 'foo' , methods : { f1 : f1 , f2 : function ( ) { } } } )
286+ var componentB = { extends : componentA , methods : { f2 : f2 } }
287+ var componentC = { extends : componentB , template : 'bar' , methods : { f3 : f3 } }
289288 var res = merge ( { } , componentC )
290289 expect ( res . template ) . toBe ( 'bar' )
291290 expect ( res . methods . f1 ) . toBe ( f1 )
You can’t perform that action at this time.
0 commit comments