mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 21:52:17 -04:00
Update yggdrasil.js to fix bug
This fixes a crash that occurs on line 310 of index.js where it tries to read the value of client.session.selectedProfile.id which doesn't exist if the session was acquired by a refresh with old auth details.
This commit is contained in:
parent
09cdf6c77d
commit
bcbcf5ef7f
@ -20,7 +20,8 @@ function getSession(username, password, clientToken, refresh, cb) {
|
||||
var session = {
|
||||
accessToken: resp.body.accessToken,
|
||||
clientToken: resp.body.clientToken,
|
||||
username: resp.body.selectedProfile.name
|
||||
username: resp.body.selectedProfile.name,
|
||||
selectedProfile: resp.body.selectedProfile
|
||||
};
|
||||
cb(null, session);
|
||||
} else {
|
||||
@ -100,4 +101,4 @@ exports.getSession = getSession;
|
||||
exports.joinServer = joinServer;
|
||||
exports.validateSession = validateSession;
|
||||
exports.generateUUID = require("node-uuid").v4;
|
||||
exports.loginType = "yggdrasil";
|
||||
exports.loginType = "yggdrasil";
|
||||
|
Loading…
x
Reference in New Issue
Block a user