diff --git a/lib/html.dart b/lib/html.dart index 2263e6e..6b3ea6e 100644 --- a/lib/html.dart +++ b/lib/html.dart @@ -78,10 +78,7 @@ class HtmlWebSocketChannel extends StreamChannelMixin : this( WebSocket( url.toString(), - (protocols?.toList() ?? const []) - .map((e) => e.toJS) - .toList() - .toJS, + protocols?.map((e) => e.toJS).toList().toJS ?? JSArray(), )..binaryType = (binaryType ?? BinaryType.list).value, );