Update getUserInventoryContents

There will be a re-loop if description of the item not the last one in descriptions (and quickDescriptionLookup will rewrite everytime)
This commit is contained in:
Eduard Kuzmenko
2017-04-21 15:26:45 +03:00
committed by GitHub
parent b4772baf39
commit 68b1f21655

View File

@@ -441,10 +441,8 @@ SteamCommunity.prototype.getUserInventoryContents = function(userID, appID, cont
for (var i = 0; i < descriptions.length; i++) {
quickDescriptionLookup[key] = descriptions[i];
if (descriptions[i].classid == classID && descriptions[i].instanceid == instanceID) {
return descriptions[i];
}
}
return quickDescriptionLookup[key];
}
};