diff --git a/src/node/db/SessionManager.js b/src/node/db/SessionManager.js index ec4948a6..5ce4f748 100644 --- a/src/node/db/SessionManager.js +++ b/src/node/db/SessionManager.js @@ -139,7 +139,7 @@ exports.createSession = function(groupID, authorID, validUntil, callback) if(ERR(err, callback)) return; //the entry doesn't exist so far, let's create it - if(group2sessions == null) + if(group2sessions == null || group2sessions.sessionIDs == null) { group2sessions = {sessionIDs : {}}; } @@ -162,7 +162,7 @@ exports.createSession = function(groupID, authorID, validUntil, callback) if(ERR(err, callback)) return; //the entry doesn't exist so far, let's create it - if(author2sessions == null) + if(author2sessions == null || author2sessions.sessionIDs == null) { author2sessions = {sessionIDs : {}}; }