Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make app.session.load automatically detect instance

  • Loading branch information...
commit 79d3cb349a44ec5e77541acbdee771771d6ea13b 1 parent 065dd01
Ernesto Méndez mendezcode authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  middleware/session/session.js
3  middleware/session/session.js
View
@@ -191,7 +191,7 @@ Session.prototype.destroy = function(req, res, callback) {
*/
Session.prototype.load = function(req, res) {
- this.loadSession(req, res, req.next);
+ (this instanceof Session ? this : app.session).loadSession(req, res, req.next);
}
/**
@@ -204,6 +204,7 @@ Session.prototype.load = function(req, res) {
*/
Session.prototype.loadSession = function(req, res, callback) {
+
var fingerprint, sessHash, sessId, self;
if (req.__loadedSession === true) {
Please sign in to comment.
Something went wrong with that request. Please try again.