Skip to content

Commit

Permalink
[http] Fix type cast for dart2wasm (#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Nov 21, 2023
1 parent a2f0b25 commit 8c9feb5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkgs/http/lib/src/browser_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import 'dart:async';
import 'dart:js_interop';
import 'dart:typed_data';

import 'package:web/helpers.dart';

Expand Down Expand Up @@ -79,7 +78,7 @@ class BrowserClient extends BaseClient {
));
return;
}
var body = (xhr.response as ByteBuffer).asUint8List();
var body = (xhr.response as JSArrayBuffer).toDart.asUint8List();
completer.complete(StreamedResponse(
ByteStream.fromBytes(body), xhr.status,
contentLength: body.length,
Expand Down

0 comments on commit 8c9feb5

Please sign in to comment.