Fix error where chat stops working if a user has no badges
This commit is contained in:
parent
4053bd2d46
commit
59d3de78f4
@ -75,7 +75,9 @@ export default {
|
||||
}
|
||||
},
|
||||
getBadges(message: { username: string, channel: string, message: string, messageType: string, tags: Record<string, string> }) {
|
||||
let badges = message.tags.badges.split(',')
|
||||
let badgesString = message.tags.badges
|
||||
if (!badgesString) return;
|
||||
let badges = badgesString.split(',')
|
||||
let formatedBadges = badges.map((badgeWithVersion) => {
|
||||
const [setId, version] = badgeWithVersion.split('/')
|
||||
return { setId, version }
|
||||
|
Loading…
x
Reference in New Issue
Block a user