mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-30 14:41:27 -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 = {
|
var session = {
|
||||||
accessToken: resp.body.accessToken,
|
accessToken: resp.body.accessToken,
|
||||||
clientToken: resp.body.clientToken,
|
clientToken: resp.body.clientToken,
|
||||||
username: resp.body.selectedProfile.name
|
username: resp.body.selectedProfile.name,
|
||||||
|
selectedProfile: resp.body.selectedProfile
|
||||||
};
|
};
|
||||||
cb(null, session);
|
cb(null, session);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user