Browse Source

Fixed error where respondent has no game.

pull/17/head
jrtechs 4 years ago
parent
commit
07aefd1880
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/main/java/net/jrtechs/www/SteamAPI/APIConnection.java

+ 1
- 1
src/main/java/net/jrtechs/www/SteamAPI/APIConnection.java View File

@ -130,7 +130,7 @@ public class APIConnection
JSONObject object = new JSONObject(apiData);
System.out.println(object);
if(object.has("response"))
if(object.has("response") && object.getJSONObject("response").has("games"))
{
JSONArray gamesJ = object.getJSONObject("response").getJSONArray("games");
IntStream.range(0, gamesJ.length()).forEach(i ->

Loading…
Cancel
Save