Skip to content

Commit

Permalink
Fixed null rank
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-yun committed Jun 17, 2018
1 parent ed7f1e6 commit 3429c90
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ public static Profile getProfile(String battleTag, String platform, String regio
result.SetLevel(stats.get("level").getAsString(), stats.get("prestige").getAsString(), stats.get("levelIcon").getAsString());
result.gamesWon = stats.get("gamesWon").getAsString();
try {
result.SetRank(stats.get("rating").getAsString(), stats.get("ratingName").getAsString().toLowerCase());
String tier = stats.get("ratingName").getAsString().toLowerCase();
if (!tier.equals(""))
result.SetRank(stats.get("rating").getAsString(), stats.get("ratingName").getAsString().toLowerCase());
else
result.SetRank("", "nullrank");
} catch (UnsupportedOperationException e) {
result.SetRank("", "nullrank");
}
Expand Down

0 comments on commit 3429c90

Please sign in to comment.