Reject blank emote names and images
This commit is contained in:
parent
889fb6595f
commit
11d4c4ca62
2 changed files with 20 additions and 2 deletions
|
|
@ -2561,8 +2561,12 @@ function formatUserPlaylistList() {
|
|||
function loadEmotes(data) {
|
||||
CHANNEL.emotes = [];
|
||||
data.forEach(function (e) {
|
||||
e.regex = new RegExp(e.source, "gi");
|
||||
CHANNEL.emotes.push(e);
|
||||
if (e.image && e.name) {
|
||||
e.regex = new RegExp(e.source, "gi");
|
||||
CHANNEL.emotes.push(e);
|
||||
} else {
|
||||
console.error("Rejecting invalid emote: " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue