mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-07 16:10:11 +08:00
Merge pull request #87 from andrewda/patch-1
Fixed crash when handling an inventory issue
This commit is contained in:
commit
55027f7b1f
@ -262,7 +262,12 @@ SteamCommunity.prototype.getUserInventory = function(userID, appID, contextID, t
|
||||
}
|
||||
|
||||
if(!body || !body.success || !body.rgInventory || !body.rgDescriptions || !body.rgCurrency) {
|
||||
callback(new Error(body.Error || "Malformed response"));
|
||||
if(body) {
|
||||
callback(new Error(body.Error || "Malformed response"));
|
||||
} else {
|
||||
callback(new Error("Malformed response"));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user