Cannot read properties of null (reading ‘split‘)

TypeError: Cannot read properties of null (reading ‘split‘)

解决办法:将 str.split(’,’)变成(str || “”).split(’,’)
例:

obj.tmp.split(":")

改为

 (obj.tmp || "").split(":")

你可能感兴趣的:(前端,前端,vue)