Merge pull request #86 from bartlomiej-korpus/master
fix TypeError when authenticate is sent with null
This commit is contained in:
commit
2d3e292268
@ -41,7 +41,7 @@ function noQsMethod(options) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if(typeof data.token !== "string") {
|
if(!data || typeof data.token !== "string") {
|
||||||
return onError({message: 'invalid token datatype'}, 'invalid_token');
|
return onError({message: 'invalid token datatype'}, 'invalid_token');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user