Merge pull request #87 from andrewda/patch-1

Fixed crash when handling an inventory issue
This commit is contained in:
Alexander Corn 2016-03-04 00:18:17 -05:00
commit 55027f7b1f

View File

@ -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;
}