File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ export function initState (vm: Component) {
32
32
33
33
function initProps ( vm : Component ) {
34
34
const props = vm . $options . props
35
- const propsData = vm . $options . propsData
36
35
if ( props ) {
36
+ const propsData = vm . $options . propsData || { }
37
37
const keys = vm . $options . _propKeys = Object . keys ( props )
38
38
const isRoot = ! vm . $parent
39
39
// root instance props should be converted
Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ type PropOptions = {
14
14
export function validateProp (
15
15
key : string ,
16
16
propOptions : Object ,
17
- propsData : ? Object ,
17
+ propsData : Object ,
18
18
vm ?: Component
19
19
) : any {
20
- /* istanbul ignore if */
21
- if ( ! propsData ) return
22
20
const prop = propOptions [ key ]
23
21
const absent = ! hasOwn ( propsData , key )
24
22
let value = propsData [ key ]
You can’t perform that action at this time.
0 commit comments