Skip to content

Commit

Permalink
fixed js message handling
Browse files Browse the repository at this point in the history
  • Loading branch information
antonsergeyev committed Mar 10, 2020
1 parent 55eb156 commit 8e7843e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions console/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tmpl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
var wsProtocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
var ws = new WebSocket(wsProtocol + location.host + "/echo");
ws.onmessage = function(e) {
var message = JSON.parse(event.data);
var message = JSON.parse(e.data);
logRequest(message);
};

var ws = new WebSocket(wsProtocol + location.host + "/log");
ws.onmessage = function(e) {
var message = JSON.parse(event.data);
var message = JSON.parse(e.data);
writeLog(message);
};
});
Expand Down

0 comments on commit 8e7843e

Please sign in to comment.