Skip to content

Commit

Permalink
Fix crash on receiving a message
Browse files Browse the repository at this point in the history
  • Loading branch information
sburba committed Nov 4, 2019
1 parent c17c9f5 commit 96de137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/network/TokenStateClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class TokenStateClient {
private readonly onStateUpdate: (state: TokenState[]) => void
) {
socket.addEventListener("open", TokenStateClient.onConnect);
socket.addEventListener("message", this.onMessage);
socket.addEventListener("message", this.onMessage.bind(this));
socket.addEventListener("close", TokenStateClient.onClose);
}

Expand Down

0 comments on commit 96de137

Please sign in to comment.