This commit is contained in:
2020-04-10 17:04:50 -04:00
parent 0c337716d3
commit 5266aec2b1
14 changed files with 300 additions and 244 deletions

View File

@ -27,7 +27,7 @@ function processKeys(map, data, partial){
continue;
}
if(data.hasOwnProperty(key) && typeof(data[key]) !== map[key].type){
if(data.hasOwnProperty(key) && map[key].type && typeof(data[key]) !== map[key].type){
errors.push({key, message:`${key} is not ${map[key].type} type.`});
continue;
}