html52.com
我爱小程序-开发者交流社区

官方监控到的错误日志,大家帮我看看这是什么问题?

Cannot read property 'archives' of undefined;at api request success callback function

TypeError: Cannot read property 'archives' of undefined

at doOk (https://miniprogram:///pages/channel_list/channel_list.js:104:66)

at success (https://miniprogram:///app.js:428:45)

----------------

undefined is not an object (evaluating 'r.data.channel[r.data.currentTab].archives');at api request success callback function
doOk@https://miniprogram:///pages/channel_list/channel_list.js:104:54
https://lib/WASubContext.js:2:1313158
https://lib/WAServiceMainContext.js:2:127544
E@https://lib/WASubContext.js:2:420308
https://lib/WASubContext.js:2:799661
emit@https://lib/WASubContext.js:2:478421
rs@https://lib/WASubContext.js:2:800527
https://lib/WASubContext.js:2:801806
https://lib/WASubContext.js:2:463395
https://lib/WAServiceMainContext.js:2:225318
_@https://lib/WAServiceMainContext.js:2:77637


···········

Cannot read property 'archives' of undefined;at api request success callback function
TypeError: Cannot read property 'archives' of undefined
at doOk (https://miniprogram:///pages/channel_list/channel_list.js:104:66)
at success (https://miniprogram:///app.js:428:45)
at Function.<anonymous> (https://lib/WASubContext.js:2:1361934)
at E (https://lib/WASubContext.js:2:423982)
at i.<anonymous> (https://lib/WASubContext.js:2:852166)
at i.emit (https://lib/WASubContext.js:2:478225)
at Ii (https://lib/WASubContext.js:2:853028)
at https://lib/WASubContext.js:2:854307
at https://lib/WASubContext.js:2:471141

网友回复

Mixchain 俞哄哄🧟:

通过你的代码中判断应该是"archives" 未成功获取 直接去使用导致出现undefined

若有帮助请帮忙点个"有用"谢谢👇👇

亮子🌞:
比如一个a={}   a.b这样不会报错   但是如果a=undefined或者a=null就会报错  因为你尝试去读取一个非对象的属性
xy:

archives应该是没有获取到

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付