提问人:rupal modi 提问时间:11/6/2023 更新时间:11/6/2023 访问量:20
无法读取属性“undefinedProperty”
Cannot read property 'undefinedProperty'
问:
我收到这个错误 错误消息:“TypeError:无法读取 null 的属性'undefinedProperty'”
试过这个,这救了我的命!
if (myObject & & myObject.undefinedProperty) {
在此处访问该物业
控制台.log(myObject.undefinedProperty);
} else {
处理未定义属性的情况
console.log(“'undefinedProperty'不可用.”);
}
答: 暂无答案
评论