diff --git a/CHANGELOG.md b/CHANGELOG.md index ffb720c..0148891 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.0.0-beta.4 + +**Bug fix:** +* [#394](https://github.com/rikulo/socket.io-client-dart/issues/394) Incorrect argument matching in notifyOutgoingListeners + ## 3.0.0-beta.3 **Bug fix:** diff --git a/lib/src/socket.dart b/lib/src/socket.dart index 1f21ec0..c6e865d 100644 --- a/lib/src/socket.dart +++ b/lib/src/socket.dart @@ -319,7 +319,7 @@ class Socket extends EventEmitter { if (_anyOutgoingListeners.isNotEmpty) { final listeners = List.from(_anyOutgoingListeners); for (final listener in listeners) { - Function.apply(listener, [packet['data']]); + Function.apply(listener, packet['data']); } } } diff --git a/pubspec.yaml b/pubspec.yaml index 2bfefed..ba3c790 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: socket_io_client description: Dartlang port of socket.io-client for web, flutter, dartvm to use -version: 3.0.0-beta.3 +version: 3.0.0-beta.4 homepage: https://www.zkoss.org repository: https://github.com/rikulo/socket.io-client-dart issue_tracker: https://github.com/rikulo/socket.io-client-dart/issues diff --git a/test/io_client.dart b/test/io_client.dart index 935b6fa..d89e4fe 100644 --- a/test/io_client.dart +++ b/test/io_client.dart @@ -13,6 +13,9 @@ void main() { // socket.connect(); + // Test for #394 + socket.onAnyOutgoing((event, data) => print('outgoing: $event, data: $data')); + socket.onConnect((_) { socket.emit('toServer', 'init');