Skip to content

Commit bb830b4

Browse files
authored
Merge pull request #99 from nativescript-community/ios-empty-response-text-fix
fix(ios): Unexpected end of JSON input
2 parents 2437101 + 21e19b3 commit bb830b4

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 = data ? parseJSON(data) : null;
181181
return this.jsonResponse as T;
182182
}
183183
toJSONAsync<T>() {

0 commit comments

Comments
 (0)