Skip to content

Commit

Permalink
feat!: return undefined if no debug content
Browse files Browse the repository at this point in the history
  • Loading branch information
some1chan committed Aug 31, 2022
1 parent e1f29e4 commit b059bcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/structures/BaseDiscordMenuFlowPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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}`;
Expand Down

0 comments on commit b059bcf

Please sign in to comment.