Skip to content

Commit

Permalink
Fix crash when sorting campaigns (#174). Update version number
Browse files Browse the repository at this point in the history
  • Loading branch information
TychoTheTaco committed Aug 11, 2022
1 parent 46db0d8 commit 5f81287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/twitch_drops_bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5f81287

Please sign in to comment.