fix TypeError when authenticate is sent with null

This commit is contained in:
bartlomiej-korpus 2016-05-26 21:01:17 +02:00
parent 23b6242d2a
commit 64ed562d05

View File

@ -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');
} }