fix live chat error (#3558)

This commit is contained in:
ChunkyProgrammer
2023-05-17 16:24:15 +02:00
committed by GitHub
parent a526a2ce0c
commit 2860431abe
@@ -212,7 +212,7 @@ export default defineComponent({
const parsedComment = {
message: autolinker.link(parseLocalTextRuns(comment.message.runs, 20)),
author: {
name: comment.author.name.text,
name: comment.author.name,
thumbnailUrl: comment.author.thumbnails.at(-1).url,
isOwner: comment.author.id === this.channelId,
isModerator: comment.author.is_moderator,
@@ -222,7 +222,7 @@ export default defineComponent({
if (badge) {
parsedComment.badge = {
url: badge.custom_thumbnail.at(-1).url,
url: badge.custom_thumbnail.at(-1)?.url,
tooltip: badge.tooltip ?? ''
}
}