Skip to content

Commit

Permalink
[docs] fix this scope in the chat example
Browse files Browse the repository at this point in the history
`user is typing` messages were not properly removed

Closes #3291
  • Loading branch information
darrachequesne committed Aug 28, 2018
1 parent 2dbec77 commit 7e35f90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/chat/public/main.js
Expand Up @@ -108,7 +108,7 @@ $(function() {

// Removes the visual chat typing message
const removeChatTyping = (data) => {
getTypingMessages(data).fadeOut(() => {
getTypingMessages(data).fadeOut(function () {
$(this).remove();
});
}
Expand Down Expand Up @@ -171,7 +171,7 @@ $(function() {

// Gets the 'X is typing' messages of a user
const getTypingMessages = (data) => {
return $('.typing.message').filter(i => {
return $('.typing.message').filter(function (i) {
return $(this).data('username') === data.username;
});
}
Expand Down

0 comments on commit 7e35f90

Please sign in to comment.