Skip to content

Commit 4297af1

Browse files
committed
Simplify LiveDataMapper#map
1 parent d09c90e commit 4297af1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Client/src/main/java/io/github/jwdeveloper/tiktok/http/mappers/LiveDataMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public LiveData.Response map(String json) {
6565
default -> LiveData.LiveStatus.HostNotFound;
6666
};
6767
response.setLiveStatus(statusValue);
68-
} else if (data.has("prompts") && jsonObject.has("status_code") && data.get("prompts").getAsString().isEmpty() && jsonObject.get("status_code").isJsonPrimitive()) {
68+
} else if (data.has("prompts") && data.get("prompts").getAsString().isEmpty() && jsonObject.has("status_code")) {
6969
response.setAgeRestricted(jsonObject.get("status_code").getAsInt() == TikTokLiveHttpClient.TIKTOK_AGE_RESTRICTED_CODE);
7070
} else {
7171
response.setLiveStatus(LiveData.LiveStatus.HostNotFound);

0 commit comments

Comments
 (0)