Skip to content

Commit

Permalink
fix: catch null
Browse files Browse the repository at this point in the history
  • Loading branch information
fearandesire committed Nov 15, 2024
1 parent 0089be3 commit 7d4ba56
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils/guilds/prop-embeds/PropEmbedManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,11 @@ export default class PropEmbedManager {
// For each sport that has props
for (const sport in propsBySport) {
// Get the guilds for this sport
const sportGuilds = guildsBySport[sport];
const sportProps = propsBySport[sport];
const sportGuilds = guildsBySport[sport] || [];
const sportProps = propsBySport[sport] || [];

// ? Skip empty entries
if (!sportProps.length || !sportGuilds.length) continue;

// For each guild that follows this sport
for (const { guild_id, channel_id } of sportGuilds) {
Expand Down

0 comments on commit 7d4ba56

Please sign in to comment.