Skip to content

Commit

Permalink
updated fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dolanmiu committed Jan 3, 2017
1 parent 7e7a394 commit a231ea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h4>Current players online: <span id="players-online"></span></h4>
$('#login-form').hide();
currentSocket = socket;
socket.on('chat-message', (payload) => {
$('<div/>').text(payload.message).appendTo($('#messages-box'));
$('<div/>').text(`<p><strong>${payload.name}:</strong> ${payload.message}</p>`).appendTo($('#messages-box'));
$('#messages-box').scrollTop($('#messages-box')[0].scrollHeight);
});
});
Expand Down

0 comments on commit a231ea2

Please sign in to comment.