diff --git a/package.json b/package.json index 86289f7..89032cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "twitch_drops_bot", - "version": "1.2.4", + "version": "1.2.5", "description": "A Node.js bot for automatically collecting Twitch drops.", "type": "module", "repository": { diff --git a/src/twitch_drops_bot.ts b/src/twitch_drops_bot.ts index 2d4edba..1fa5162 100644 --- a/src/twitch_drops_bot.ts +++ b/src/twitch_drops_bot.ts @@ -560,7 +560,7 @@ export class TwitchDropsBot extends EventEmitter { #getFirstBroadcasterIndex(campaign: DropCampaign) { for (let i = 0; i < this.#broadcasterIds.length; ++i) { - if (campaign.allow && campaign.allow.isEnabled) { + if (campaign.allow && campaign.allow.isEnabled && campaign.allow.channels) { for (const channel of campaign.allow.channels) { if (channel.displayName.toLowerCase() === this.#broadcasterIds[i].toLowerCase()) { return i;