diff --git a/lib/meteor-down.js b/lib/meteor-down.js index be180a9..0d14a89 100644 --- a/lib/meteor-down.js +++ b/lib/meteor-down.js @@ -21,7 +21,7 @@ Meteor.methods({ // this does not resume subscriptions and so on, and we don't really need it // we do this at the start, so this is fine var sessionId = this.connection.id; - var session = Meteor.server.sessions[sessionId]; + var session = Meteor.server.sessions.get(sessionId); session.userId = user._id; return user; @@ -38,4 +38,4 @@ MeteorDown.login = function (params) { if(params.userId) { return Meteor.users.findOne(params.userId); } -} \ No newline at end of file +}