mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-31 19:40:14 +08:00
Fixed crash if response to login is malformed
This commit is contained in:
parent
9a3138aa35
commit
fddd74cf24
2
index.js
2
index.js
@ -135,6 +135,8 @@ SteamCommunity.prototype.login = function(details, callback) {
|
||||
callback(error);
|
||||
} else if(!body.success) {
|
||||
callback(new Error(body.message || "Unknown error"));
|
||||
} else if(!body.oauth) {
|
||||
callback(new Error("Malformed response"));
|
||||
} else {
|
||||
var sessionID = generateSessionID();
|
||||
var oAuth = JSON.parse( body.oauth );
|
||||
|
Loading…
Reference in New Issue
Block a user