From 7d4ba56fb8af738697414a770ff0c7b34c6a74ec Mon Sep 17 00:00:00 2001 From: fearandesire Date: Fri, 15 Nov 2024 16:55:01 -0500 Subject: [PATCH] fix: catch null --- src/utils/guilds/prop-embeds/PropEmbedManager.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/guilds/prop-embeds/PropEmbedManager.ts b/src/utils/guilds/prop-embeds/PropEmbedManager.ts index d2dd2596..f5954eff 100644 --- a/src/utils/guilds/prop-embeds/PropEmbedManager.ts +++ b/src/utils/guilds/prop-embeds/PropEmbedManager.ts @@ -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) {