File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -452,18 +452,21 @@ export default class Wrapper implements BaseWrapper {
452
452
if ( ! this . isVueComponent || ! this . vm ) {
453
453
throwError ( 'wrapper.setProps() can only be called on a Vue instance' )
454
454
}
455
- if ( ! this . vm . $options . propsData ) {
455
+ if ( this . vm && this . vm . $options && ! this . vm . $options . propsData ) {
456
456
this . vm . $options . propsData = { }
457
457
}
458
458
Object . keys ( data ) . forEach ( ( key ) => {
459
459
// $FlowIgnore : Problem with possibly null this.vm
460
460
if ( this . vm . _props ) {
461
461
this . vm . _props [ key ] = data [ key ]
462
+ // $FlowIgnore : Problem with possibly null this.vm.$props
462
463
this . vm . $props [ key ] = data [ key ]
464
+ // $FlowIgnore : Problem with possibly null this.vm.$options
463
465
this . vm . $options . propsData [ key ] = data [ key ]
464
466
} else {
465
467
// $FlowIgnore : Problem with possibly null this.vm
466
468
this . vm [ key ] = data [ key ]
469
+ // $FlowIgnore : Problem with possibly null this.vm.$options
467
470
this . vm . $options . propsData [ key ] = data [ key ]
468
471
}
469
472
} )
You can’t perform that action at this time.
0 commit comments