Red react reported error summary
一、Uncaught TypeError: Cannot read property 'value' of undefined
Unknown type error: unable to read undefined property "value"
My source:
console.log(item.controlAttributeObj.placeholder.value)
wrong reason:
The initial value controlAttributeObj {}, so the first time to obtain placeholder undefined, undefined attributes is not, so in this case not obtain the value attribute
Solve the error:
console.log((item.controlAttributeObj.placeholder || {}).value)