Skip to content

Commit

Permalink
Fix #398 [Issue] Unhandled Exception: type 'String' is not a subtype …
Browse files Browse the repository at this point in the history
…of type 'Iterable<dynamic>' on Server Acknowledgement
  • Loading branch information
jumperchen committed Nov 4, 2024
1 parent 885d779 commit 28c845e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 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.1

**Bug fix:**
* [#398](https://github.com/rikulo/socket.io-client-dart/issues/398) [Issue] Unhandled Exception: type 'String' is not a subtype of type 'Iterable<dynamic>' on Server Acknowledgement

## 3.0.0

**Bug fix:**
Expand Down
5 changes: 4 additions & 1 deletion lib/src/socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,10 @@ class Socket extends EventEmitter {

acks[sid] = (args) {
timer.cancel();
Function.apply(ack, [null, ...args]);
Function.apply(ack, [
null,
...(args is List ? args : [args])
]);
};
}

Expand Down
4 changes: 2 additions & 2 deletions 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
version: 3.0.1
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 All @@ -10,7 +10,7 @@ environment:

dependencies:
logging: '^1.2.0'
socket_io_common: '^3.0.0'
socket_io_common: '^3.0.1'

dev_dependencies:
lints: ^4.0.0
Expand Down

0 comments on commit 28c845e

Please sign in to comment.