v1.18.x
barisusakli 9 years ago
parent ae9606f5ee
commit 26094778d9

@ -76,9 +76,10 @@ module.exports = function(User) {
async.map(sids, db.sessionStore.get.bind(db.sessionStore), next); async.map(sids, db.sessionStore.get.bind(db.sessionStore), next);
}, },
function(sessions, next) { function(sessions, next) {
sessions = sessions.map(function(sessionObj, idx) { sessions.forEach(function(sessionObj, idx) {
sessionObj.meta.current = curSessionId === _sids[idx]; if (sessionObj && sessionObj.meta) {
return sessionObj; sessionObj.meta.current = curSessionId === _sids[idx];
}
}); });
// Revoke any sessions that have expired, return filtered list // Revoke any sessions that have expired, return filtered list

Loading…
Cancel
Save