求大佬解答,再setdata的时候 出现了这个错误,是什么原因造成的

发布于 7 年前作者 qtian1955 次浏览最后编辑 7 年前来自 ask

Cannot read property ‘concat’ of null;at pages/update/update onShow function;at api uploadFile success callback function
TypeError: Cannot read property ‘concat’ of null

2 回复
xiulanduan
xiulanduan1 楼6 年前

我也遇到过这个问题,是同时写了2个

var that = this;

程序找不到是哪个

min81
min812 楼5 年前

这个是合并数组用的,说明其中一个数组是 null了,最好最先在 Page的data数据中定义好 xxx:[]