From b059bcf7c308fd0adea5cfb9e4ed738c7429f565 Mon Sep 17 00:00:00 2001 From: some1chan <31833556+some1chan@users.noreply.github.com> Date: Wed, 31 Aug 2022 07:35:00 +0000 Subject: [PATCH] feat!: return undefined if no debug content --- packages/core/src/structures/BaseDiscordMenuFlowPage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/structures/BaseDiscordMenuFlowPage.ts b/packages/core/src/structures/BaseDiscordMenuFlowPage.ts index 97fb579..f2d822d 100644 --- a/packages/core/src/structures/BaseDiscordMenuFlowPage.ts +++ b/packages/core/src/structures/BaseDiscordMenuFlowPage.ts @@ -142,7 +142,7 @@ export abstract class BaseDiscordMenuFlowPage extends BasePluginObject { | Discord.MessageActionRowComponent[] | Discord.MessageActionRow[] | Discord.MessageActionRow - ): string { + ): string | undefined { const isProduction = process.env.NODE_ENV == "production"; const rawEnvShowDebugContent = process.env.FRAMED_SHOW_DEBUG_INTERACTION_CONTENT?.toLowerCase(); @@ -154,7 +154,7 @@ export abstract class BaseDiscordMenuFlowPage extends BasePluginObject { : undefined; const showDebugContent = envShowDebugContent && !isProduction; - if (!showDebugContent) return ""; + if (!showDebugContent) return undefined; function getIdRender(id: string, type = "for customId") { let base = `\n\`${id}\`, ${id.length} char(s) ${type}`;