Skip to content

Commit ae50812

Browse files
committed
fix(android): prevent error with GET and onProgress
1 parent b7ad6b9 commit ae50812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/https/request.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ export function createRequest(opts: HttpsRequestOptions, useLegacy: boolean = tr
538538
}
539539
}
540540

541-
if (opts.onProgress) {
541+
if (okHttpBody && opts.onProgress) {
542542
okHttpBody = new com.nativescript.https.ProgressRequestWrapper(
543543
okHttpBody,
544544
new com.nativescript.https.ProgressRequestWrapper.ProgressListener({

0 commit comments

Comments
 (0)