Only look at cookies if they are available
This commit is contained in:
parent
0f4e9e1d1c
commit
ad58a8ec13
|
@ -174,13 +174,14 @@ function tokenIdForRequest(req, options) {
|
|||
}
|
||||
}
|
||||
|
||||
for(i = 0, length = headers.length; i < length; i++) {
|
||||
id = req.signedCookies[cookies[i]];
|
||||
if(req.signedCookies) {
|
||||
for(i = 0, length = headers.length; i < length; i++) {
|
||||
id = req.signedCookies[cookies[i]];
|
||||
|
||||
if(typeof id === 'string') {
|
||||
return id;
|
||||
if(typeof id === 'string') {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue