Skip to content

Commit

Permalink
Convert ArrayBuffer to Uint8List
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Dec 8, 2023
1 parent a5011a2 commit 31db374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class HtmlWebSocketChannel extends StreamChannelMixin
data = (eventData as JSString).toDart;
} else if (eventData.typeofEquals('object') &&
(eventData as JSObject).instanceOfString('ArrayBuffer')) {
data = (eventData as JSArrayBuffer).toDart;
data = (eventData as JSArrayBuffer).toDart.asUint8List();
} else {
// Blobs are passed directly.
data = eventData;
Expand Down

0 comments on commit 31db374

Please sign in to comment.