Merge pull request #939 from marcelklehr/fix/group2sessions-bug

Create group2sessions.sessionIDs if it doesn't exist yet.
This commit is contained in:
John McLear 2012-08-12 09:10:29 -07:00
commit 71d6d520e8
1 changed files with 2 additions and 2 deletions

View File

@ -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 : {}};
}