Skip to content

Commit 8c9feb5

Browse files
authored
[http] Fix type cast for dart2wasm (#1050)
1 parent a2f0b25 commit 8c9feb5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkgs/http/lib/src/browser_client.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'dart:async';
66
import 'dart:js_interop';
7-
import 'dart:typed_data';
87

98
import 'package:web/helpers.dart';
109

@@ -79,7 +78,7 @@ class BrowserClient extends BaseClient {
7978
));
8079
return;
8180
}
82-
var body = (xhr.response as ByteBuffer).asUint8List();
81+
var body = (xhr.response as JSArrayBuffer).toDart.asUint8List();
8382
completer.complete(StreamedResponse(
8483
ByteStream.fromBytes(body), xhr.status,
8584
contentLength: body.length,

0 commit comments

Comments
 (0)