We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b61a4c commit 11d3bdfCopy full SHA for 11d3bdf
src/cs2/items/inventory.js
@@ -39,10 +39,13 @@ export default class Inventory {
39
40
// Cache icons for items already in our inventory
41
if (!Icons.URLs[item.full_name]) {
42
- const asset = unsafeWindow.g_rgAppContextData[CS2_APPID].rgContexts[2].inventory.m_rgAssets[item.iteminfo.id];
+ for (const contextId in unsafeWindow.g_rgAppContextData[CS2_APPID].rgContexts) {
43
+ const asset = unsafeWindow.g_rgAppContextData[CS2_APPID].rgContexts[contextId].inventory.m_rgAssets[item.iteminfo.id];
44
- if (asset) {
45
- Icons.SetIcon(item.full_name, asset.description.icon_url);
+ if (asset) {
46
+ Icons.SetIcon(item.full_name, asset.description.icon_url);
47
+ break;
48
+ }
49
}
50
51
0 commit comments