Skip to content

Commit 28c845e

Browse files
committed
Fix #398 [Issue] Unhandled Exception: type 'String' is not a subtype of type 'Iterable<dynamic>' on Server Acknowledgement
1 parent 885d779 commit 28c845e

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.0.1
2+
3+
**Bug fix:**
4+
* [#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
5+
16
## 3.0.0
27

38
**Bug fix:**

lib/src/socket.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ class Socket extends EventEmitter {
311311

312312
acks[sid] = (args) {
313313
timer.cancel();
314-
Function.apply(ack, [null, ...args]);
314+
Function.apply(ack, [
315+
null,
316+
...(args is List ? args : [args])
317+
]);
315318
};
316319
}
317320

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: socket_io_client
22
description: Dartlang port of socket.io-client for web, flutter, dartvm to use
3-
version: 3.0.0
3+
version: 3.0.1
44
homepage: https://www.zkoss.org
55
repository: https://github.com/rikulo/socket.io-client-dart
66
issue_tracker: https://github.com/rikulo/socket.io-client-dart/issues
@@ -10,7 +10,7 @@ environment:
1010

1111
dependencies:
1212
logging: '^1.2.0'
13-
socket_io_common: '^3.0.0'
13+
socket_io_common: '^3.0.1'
1414

1515
dev_dependencies:
1616
lints: ^4.0.0

0 commit comments

Comments
 (0)