diff --git a/lib/logout.js b/lib/logout.js index 7e28423..27d1297 100644 --- a/lib/logout.js +++ b/lib/logout.js @@ -16,7 +16,7 @@ var STATUS = constants.STATUS; // Analyze if we should merge session handler and store module.exports.logout = function (options) { - options.sessionParticipants = options.sessionParticipants || new SessionParticipants(); + options.sessionParticipants = new SessionParticipants(options.sessionParticipants) || new SessionParticipants(); options.clearIdPSession = options.clearIdPSession || function (cb){ return cb(); }; options.store = options.store || new SessionStore({ key: '_logoutState'}); @@ -378,4 +378,4 @@ module.exports.sendLogoutError = function(options){ return prepareAndSendToken(req, res, 'LOGOUT_RESPONSE', logoutResponse, options, next); }; -}; \ No newline at end of file +};