You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just FYI, the selector breaks when a person has a name like "Some Bro", anything with a space. I didn't clone your repo or anything so I'm just posting the issue + fix here. In clien.js
Just FYI, the selector breaks when a person has a name like "Some Bro", anything with a space. I didn't clone your repo or anything so I'm just posting the issue + fix here. In clien.js
socket.on("isTyping", function(data) {
if (data.isTyping) {
if ($("#"+data.person.split(' ').join('-')+"").length === 0) {
$("#updates").append("
" + data.person + " is typing.");
......MY CUSTOM CALLBACK, OMITTED
}
} else {
$("#"+data.person.split(' ').join('-')+"").remove();
}
});
As you can see it's a simple matter of splitting where any spaces are and joining by a non space char. Cool app, much thanks for sharing it. :)
—
Reply to this email directly or view it on GitHub #11.
Just FYI, the selector breaks when a person has a name like "Some Bro", anything with a space. I didn't clone your repo or anything so I'm just posting the issue + fix here. In clien.js
socket.on("isTyping", function(data) {
if (data.isTyping) {
if ($("#"+data.person.split(' ').join('-')+"").length === 0) {
$("#updates").append("<li id='"+ data.person.split(' ').join('-') +"'> " + data.person + " is typing.");
......MY CUSTOM CALLBACK, OMITTED
}
} else {
$("#"+data.person.split(' ').join('-')+"").remove();
}
});
As you can see it's a simple matter of splitting where any spaces are and joining by a non space char. Cool app, much thanks for sharing it. :)
The text was updated successfully, but these errors were encountered: