Skip to content

Commit 949fcfb

Browse files
authored
fix(ios): Unexpected end of JSON input
1 parent 2437101 commit 949fcfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/https/request.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class HttpsResponseLegacy implements IHttpsResponseLegacy {
177177
return data;
178178
}
179179
this.stringResponse = data;
180-
this.jsonResponse = parseJSON(data);
180+
this.jsonResponse = this.stringResponse ? parseJSON(data) : null;
181181
return this.jsonResponse as T;
182182
}
183183
toJSONAsync<T>() {

0 commit comments

Comments
 (0)