Skip to content

Commit

Permalink
Check result object for existence of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
MxtOUT committed Aug 4, 2019
1 parent 66f440a commit d47e964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ class SteamCommunity extends Api {
result = await SteamCommunity.getEndpoint(`/inventory/${login.steamId}/753/${contextId}`, thisParams);
if (result && result.success) {
if (!data) data = { "assets": [], "descriptions": [] };
data.assets = data.assets.concat(result.assets);
data.descriptions = data.descriptions.concat(result.descriptions);
if (result.assets) data.assets = data.assets.concat(result.assets);
if (result.descriptions) data.descriptions = data.descriptions.concat();
}
last_assetid = result.last_assetid;
} while (result.more_items);
Expand Down

0 comments on commit d47e964

Please sign in to comment.