From 06e7919162dbad957a94b5e49f7437a685fd0847 Mon Sep 17 00:00:00 2001 From: DJj123dj <80536295+DJj123dj@users.noreply.github.com> Date: Mon, 3 Feb 2025 21:01:36 +0100 Subject: [PATCH] Fixed panel dropdown bug with empty option label --- src/builders/dropdowns.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/builders/dropdowns.ts b/src/builders/dropdowns.ts index e23da85..2f675c5 100644 --- a/src/builders/dropdowns.ts +++ b/src/builders/dropdowns.ts @@ -18,10 +18,12 @@ const panelDropdowns = () => { const {panel,options} = params const parsedOptions: api.ODDropdownData["options"] = options.map((option) => { + const label = option.get("opendiscord:button-label").value.substring(0,100) const desc = option.get("opendiscord:description").value.substring(0,100) const emoji = option.get("opendiscord:button-emoji").value + return { - label:option.get("opendiscord:button-label").value.substring(0,100), + label:(label.length > 0) ? label : "", value:"od:ticket-option_"+panel.id.value+"_"+option.id.value, emoji:(emoji.length > 0) ? emoji : undefined, description:(desc.length > 0) ? desc : undefined,