Skip to content

Commit ce057f0

Browse files
authored
Merge pull request #213 from akigupta131/master
Problem when any of ACL Middleware argument is null or undefined | Solved
2 parents adc8b4b + 178d48b commit ce057f0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/contract.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,14 @@ var checkParams = function(args, contract){
6868
}catch(e){
6969
console.log(e, args)
7070
}
71-
72-
type = typeOf(args[i]);
73-
fulfilled = false;
74-
for(j=0; j<types.length; j++){
75-
if (type === types[j]){
76-
fulfilled = true;
77-
break;
71+
if (args[i]) {
72+
type = typeOf(args[i]);
73+
fulfilled = false;
74+
for(j=0; j<types.length; j++){
75+
if (type === types[j]){
76+
fulfilled = true;
77+
break;
78+
}
7879
}
7980
}
8081
if(fulfilled===false){

0 commit comments

Comments
 (0)