Fix var to avoid pollution
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
parent
aa6881e085
commit
99ac358d11
|
@ -84,11 +84,11 @@ Receiver.prototype.check = function(payload, headers) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i in requiredHeaders){
|
requiredHeaders
|
||||||
if(!sanityHeaders[requiredHeaders[i]]){
|
.filter(required => !sanityHeaders[required])
|
||||||
throw {message: "header '" + requiredHeaders[i] + "' not found"};
|
.forEach(required => {
|
||||||
}
|
throw {message: "header '" + required + "' not found"};
|
||||||
}
|
});
|
||||||
|
|
||||||
if(sanityHeaders[Constants.BINARY_HEADERS_02.SPEC_VERSION] !== "0.2"){
|
if(sanityHeaders[Constants.BINARY_HEADERS_02.SPEC_VERSION] !== "0.2"){
|
||||||
throw {
|
throw {
|
||||||
|
|
Loading…
Reference in New Issue