mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 05:03:28 +08:00
Don't error out if a CS inventory has no visible items
This commit is contained in:
@@ -629,6 +629,13 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (appID == 730 && body && body.success && !body.assets) {
|
||||||
|
// CS inventory has no visible items. We need a special case for this because Valve is incapable of
|
||||||
|
// doing anything not dumb.
|
||||||
|
callback(null, [], [], body.total_inventory_count);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!body || !body.success || !body.assets || !body.descriptions) {
|
if (!body || !body.success || !body.assets || !body.descriptions) {
|
||||||
if (body) {
|
if (body) {
|
||||||
// Dunno if the error/Error property even exists on this new endpoint
|
// Dunno if the error/Error property even exists on this new endpoint
|
||||||
|
|||||||
Reference in New Issue
Block a user