Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #51 from gkorland/patch-2
Browse files Browse the repository at this point in the history
Check "data.query" exists
  • Loading branch information
screeny05 committed Feb 22, 2014
2 parents af84565 + 3eefdf6 commit 2f15376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function authorize(options) {

return function(data, accept){
data.cookie = parseCookie(auth, data.headers.cookie || '');
data.sessionID = data.query.session_id || data.cookie[auth.key] || '';
data.sessionID = (data.query && data.query.session_id) || data.cookie[auth.key] || '';
data[auth.userProperty] = {
logged_in: false
};
Expand Down

0 comments on commit 2f15376

Please sign in to comment.