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

报错如下图:
在这里插入图片描述
将 str.split(’,’)

变成

(str || “”).split(’,’)