From d2a079fcde425eb7d8af24460c0b8d96f94ba28a Mon Sep 17 00:00:00 2001 From: sora Date: Thu, 21 Apr 2022 21:19:52 +0200 Subject: [PATCH] Update 'twitch/chatguessr.js' --- twitch/chatguessr.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/twitch/chatguessr.js b/twitch/chatguessr.js index 6de94fb..db9ed98 100644 --- a/twitch/chatguessr.js +++ b/twitch/chatguessr.js @@ -8,10 +8,12 @@ json = new JSONObject('{}'); var request = HttpRequest.getData(HttpRequest.RequestType.GET,'https://www.geoguessr.com/api/v3/games/'+id,json.toString(),header); if (request.success) { - var data = new JSONObject(request.content) - return JSON.parse(data); + var data = new JSONObject(request.content) + return JSON.parse(data); } + return {}; }; + function getCountryBDC(location) { var HttpRequest = Packages.com.gmt2001.HttpRequest, HashMap = Packages.java.util.HashMap,