You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read property 'split' of undefined
at :50140/appservice/a
at :50140/appservice/base.wxml:1003(env: macOS,mp,1.06.2303220; lib: 3.1.0)
经过查看报错内容发现,报错的问题点在 编译后根目录的 utils.wxs 文件中的 a 方法中。
a: function (l, n, s) {
var a = ["7","0","21","5","2","12","6","4","55","56","29","23","52","60","61","send-coupon","popup-component","t-captcha","custom-wrapper"]
var b = ["4","55","56","29","23","52","60","61"]
if (a.indexOf(n) === -1) {
l = 0
}
if (b.indexOf(n) > -1) {
var u = s.split(',')
var depth = 0
for (var i = 0; i < u.length; i ) {
if (u[i] === n) depth
}
l = depth
}
if (l === 15) {
return 'tmpl_15_container'
}
return 'tmpl_' l '_' n
},
相关平台
微信小程序
小程序基础库: 3.0.1
使用框架: React
复现步骤
taro系列框架升级到最新的3.6.17版本后,在我的小程序的某个页面中,出现了大量的这个报错。在之前3.6.15版本时没有这个报错。
经过查看报错内容发现,报错的问题点在 编译后根目录的
utils.wxs
文件中的 a 方法中。上面的代码中,
s.split(',')
引发的报错。而这个a方法是在编译后根目录的base.wxml
文件中调用的。例如其中一段报错的位置:
猜测是使用模板时,其中某个环节,
l
参数为undefined
,导致的报错。但是不确定什么情况下会出现期望结果
不报错异常
实际结果
部分页面报错异常
环境信息
The text was updated successfully, but these errors were encountered: