diff --git a/web/src/hooks/use7tvChannelEmotes.ts b/web/src/hooks/use7tvChannelEmotes.ts index 1799a5f..a244bfc 100644 --- a/web/src/hooks/use7tvChannelEmotes.ts +++ b/web/src/hooks/use7tvChannelEmotes.ts @@ -29,7 +29,7 @@ export function use7tvChannelEmotes(channelId: string): Array { const emotes = []; - for (const channelEmote of data?.emote_set.emotes ?? []) { + for (const channelEmote of data?.emote_set?.emotes ?? []) { const webpEmotes = channelEmote.data.host.files.filter(i => i.format === 'WEBP'); const emoteURL = channelEmote.data.host.url; emotes.push({ diff --git a/web/src/types/7tv.ts b/web/src/types/7tv.ts index 847a05f..f81f2ca 100644 --- a/web/src/types/7tv.ts +++ b/web/src/types/7tv.ts @@ -6,7 +6,7 @@ interface StvGlobal { } interface StvChannel { - emote_set: StvEmoteSet; + emote_set: StvEmoteSet | null; } interface StvEmoteSet {