Skip to content

Commit

Permalink
Tweak a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelyteapot committed Sep 13, 2023
1 parent e1ec758 commit a35dfc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dio/lib/src/adapters/browser_adapter.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer' as dev;
import 'dart:html';
import 'dart:typed_data';
import 'dart:developer' as dev;

import 'package:meta/meta.dart';

Expand Down Expand Up @@ -120,9 +120,9 @@ class BrowserHttpClientAdapter implements HttpClientAdapter {
// absolutely necessary, because registering an xhr upload listener prevents
// the request from being classified as a "simple request" by the CORS spec.
// Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests
// Upload progress events only get triggered if the request body exists,
// so we can check it beforehand.
if (requestStream != null) {
// XMLHttpRequestUpload progress events only get triggered if
// the request body isn't empty, so we can check it beforehand.
if (connectTimeoutTimer != null) {
xhr.upload.onProgress.listen((event) {
connectTimeoutTimer?.cancel();
Expand Down

0 comments on commit a35dfc3

Please sign in to comment.