mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 13:13:28 +08:00
Update users.js
This commit is contained in:
@@ -431,16 +431,14 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont
|
||||
var quickDescriptionLookup = {};
|
||||
|
||||
function getDescription(descriptions, classID, instanceID) {
|
||||
instanceID = instanceID || '0'; // instanceID can be undefined, in which case it's 0.
|
||||
|
||||
var key = classID + '_' + instanceID;
|
||||
var key = classID + '_' + (instanceID || '0'); // instanceID can be undefined, in which case it's 0.
|
||||
|
||||
if (quickDescriptionLookup[key]) {
|
||||
return quickDescriptionLookup[key];
|
||||
}
|
||||
|
||||
for (var i = 0; i < descriptions.length; i++) {
|
||||
quickDescriptionLookup[key] = descriptions[i];
|
||||
quickDescriptionLookup[descriptions[i].classid + '_' + (descriptions[i].instanceid || '0')] = descriptions[i];
|
||||
}
|
||||
|
||||
return quickDescriptionLookup[key];
|
||||
|
||||
Reference in New Issue
Block a user