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 {
452452 if ( ! this . isVueComponent || ! this . vm ) {
453453 throwError ( 'wrapper.setProps() can only be called on a Vue instance' )
454454 }
455- if ( ! this . vm . $options . propsData ) {
455+ if ( this . vm && this . vm . $options && ! this . vm . $options . propsData ) {
456456 this . vm . $options . propsData = { }
457457 }
458458 Object . keys ( data ) . forEach ( ( key ) => {
459459 // $FlowIgnore : Problem with possibly null this.vm
460460 if ( this . vm . _props ) {
461461 this . vm . _props [ key ] = data [ key ]
462+ // $FlowIgnore : Problem with possibly null this.vm.$props
462463 this . vm . $props [ key ] = data [ key ]
464+ // $FlowIgnore : Problem with possibly null this.vm.$options
463465 this . vm . $options . propsData [ key ] = data [ key ]
464466 } else {
465467 // $FlowIgnore : Problem with possibly null this.vm
466468 this . vm [ key ] = data [ key ]
469+ // $FlowIgnore : Problem with possibly null this.vm.$options
467470 this . vm . $options . propsData [ key ] = data [ key ]
468471 }
469472 } )
You can’t perform that action at this time.
0 commit comments