Skip to content

Commit

Permalink
1. Fixed #394 Incorrect argument matching in notifyOutgoingListeners
Browse files Browse the repository at this point in the history
2. Bump 3.0.0-beta.4
  • Loading branch information
jumperchen committed Sep 25, 2024
1 parent fcd1a36 commit 740b0ed
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion lib/src/socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions test/io_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 740b0ed

Please sign in to comment.