Skip to content

Commit

Permalink
Fix incorrect cast causing wasm failure, prepare v4.1.4 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Nov 22, 2023
1 parent 0f6ca11 commit 1df63f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.1.4

- Fix incorrect cast causing failure with `dart2wasm`.

## 4.1.3

- Update the minimum Dart SDK version to `3.2.0`.
Expand Down
4 changes: 2 additions & 2 deletions lib/client/sse_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ class SseClient extends StreamChannelMixin<String?> {

void _onIncomingMessage(Event message) {
var decoded =
jsonDecode((message as MessageEvent).data as String) as String;
_incomingController.add(decoded);
jsonDecode(((message as MessageEvent).data as JSString).toDart);
_incomingController.add(decoded as String);
}

void _onOutgoingDone() {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sse
version: 4.1.3
version: 4.1.4
description: >-
Provides client and server functionality for setting up bi-directional
communication through Server Sent Events (SSE) and corresponding POST
Expand Down

0 comments on commit 1df63f2

Please sign in to comment.