Skip to content

Commit 7e35f90

Browse files
committedAug 28, 2018
[docs] fix this scope in the chat example
`user is typing` messages were not properly removed Closes #3291
1 parent 2dbec77 commit 7e35f90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎examples/chat/public/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ $(function() {
108108

109109
// Removes the visual chat typing message
110110
const removeChatTyping = (data) => {
111-
getTypingMessages(data).fadeOut(() => {
111+
getTypingMessages(data).fadeOut(function () {
112112
$(this).remove();
113113
});
114114
}
@@ -171,7 +171,7 @@ $(function() {
171171

172172
// Gets the 'X is typing' messages of a user
173173
const getTypingMessages = (data) => {
174-
return $('.typing.message').filter(i => {
174+
return $('.typing.message').filter(function (i) {
175175
return $(this).data('username') === data.username;
176176
});
177177
}

0 commit comments

Comments
 (0)
Please sign in to comment.