过滤配置项中id为0的项

This commit is contained in:
zhl 2020-12-03 09:53:59 +08:00
parent eb085651d0
commit 4b6e5bdcb2

View File

@ -16,6 +16,10 @@ export var DataParser = (function (){
let dict = new Map();
for (let i = 0, len = data.length; i < len; i++) {
let obj = data[i];
if (!obj[idkey]) {
console.error(`配置${key}的数据有误,唯一标识 ${idkey} 值为0或者没有${idkey}`);
continue;
}
let to = new CfgCreator();
to.decode(obj);
if (dict.has(to.id)) {