Fix minor issues with emote rename
This commit is contained in:
parent
8e3ce4e1c3
commit
8434d20826
3 changed files with 7 additions and 4 deletions
|
|
@ -1039,6 +1039,7 @@ Callbacks = {
|
|||
// But wasn't bad before: Add it to bad list
|
||||
if(!badBefore){
|
||||
CHANNEL.badEmotes.push(data);
|
||||
delete CHANNEL.emoteMap[oldName];
|
||||
}
|
||||
// Was bad before too: Update
|
||||
else {
|
||||
|
|
@ -1060,7 +1061,10 @@ Callbacks = {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
delete CHANNEL.emoteMap[oldName];
|
||||
}
|
||||
CHANNEL.emoteMap[data.name] = data;
|
||||
}
|
||||
|
||||
EMOTELIST.handleChange();
|
||||
|
|
|
|||
|
|
@ -3146,7 +3146,7 @@ CSEmoteList.prototype.loadPage = function (page) {
|
|||
if(val === emote.name){ return }
|
||||
|
||||
// Emote name already exists
|
||||
if( CHANNEL.emotes.filter((emote)=>{ return emote.name === val }).length ){
|
||||
if( CHANNEL.emotes.filter(function(emote){ return emote.name === val }).length ){
|
||||
/*
|
||||
* Since we are already in a modal
|
||||
* and Bootstrap doesn't have supermodals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue