我有一个应用程序崩溃在特定的android api级别,如4.2和4.4。 我的最低等级是16,目标sdk是24。
这是错误logcat:
let data = [
["1 - Jan", "2 - Jan", "3 - Jan", "4 - Jan", "5 - Jan", "6 - Jan", "7 - Jan", "8 - Jan"],
["1 - Jan", "2 - Jan", "3 - Jan", "4 - Jan", "5 - Jan", "6 - Jan", "7 - Jan", "8 - Jan", "9 - Jan"],
["1 - Jan", "2 - Jan", "3 - Jan"],
["1 - Jan", "2 - Jan", "3 - Jan","4 - Jan"]
];
let filtered = data.map(dates => {
let odd = dates.length%2!=0;
return dates
.filter((e, index) => odd ? index%2==0 : index%2!=0)
});
console.log(filtered);
如何在出错时删除此类?