webStorm编辑器中报警告:Possible iteration over unexpected (custom / inherited) members, probably missing hasOwnProperty check
问题:没有hasOwnProperty验证
解决:添加 hasOwnProperty 验证
for (var key in res.data.missing) {
if (res.data.missing.hasOwnProperty(key)) {
const element = res.data.missing[key]
if (element != null) {
unfinished.push({
vol: key,
timeInterval: element
})
}
}
}