Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘message‘)
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'message')
·
问题描述:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘message’)
前端相关代码
错误产生的原因是判断的数据message还未从后端读到
正常写法
if (err.data && err.data.message) {
this.dataFlag = true
}
更多推荐
已为社区贡献7条内容
所有评论(0)