mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-01 00:28:30 +00:00
3.5.148. Fix tokenize_emotes not using hasOwnProperty to check if a key exists in an object, causing some words to get eaten in chat on Firefox.
This commit is contained in:
parent
46dee22d83
commit
5bb64a0904
6 changed files with 39 additions and 15 deletions
|
@ -756,7 +756,7 @@ FFZ.prototype.tokenize_emotes = function(user, room, tokens, do_report) {
|
|||
if ( emote_set && emote_set.emoticons )
|
||||
for(var emote_id in emote_set.emoticons) {
|
||||
emote = emote_set.emoticons[emote_id];
|
||||
if ( ! emotes[emote.name] )
|
||||
if ( ! emotes.hasOwnProperty(emote.name) )
|
||||
emotes[emote.name] = emote;
|
||||
}
|
||||
}
|
||||
|
@ -783,9 +783,9 @@ FFZ.prototype.tokenize_emotes = function(user, room, tokens, do_report) {
|
|||
|
||||
for(var x=0,y=segments.length; x < y; x++) {
|
||||
segment = segments[x];
|
||||
emote = emotes[segment];
|
||||
if ( emotes.hasOwnProperty(segment) ) {
|
||||
emote = emotes[segment];
|
||||
|
||||
if ( emote ) {
|
||||
if ( text.length ) {
|
||||
// We have pending text. Join it together, with an extra space
|
||||
// on the end for good measure.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue