From 6c1a76691d9ca9af41538c7b2d0e7df8845700c8 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Thu, 9 Oct 2025 18:49:36 +0200 Subject: [PATCH] Improve cleanup of options in InstanceDialog to skip empty strings and arrays --- webui/src/components/InstanceDialog.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webui/src/components/InstanceDialog.tsx b/webui/src/components/InstanceDialog.tsx index 324f694..4a54f7a 100644 --- a/webui/src/components/InstanceDialog.tsx +++ b/webui/src/components/InstanceDialog.tsx @@ -123,8 +123,12 @@ const InstanceDialog: React.FC = ({ if (Object.keys(cleanBackendOptions).length > 0) { (cleanOptions as any)[key] = cleanBackendOptions; } - } else if (value !== undefined && value !== null && (typeof value !== 'string' || value.trim() !== "")) { - // Handle arrays - don't include empty arrays + } else if (value !== undefined && value !== null) { + // Skip empty strings + if (typeof value === 'string' && value.trim() === "") { + return; + } + // Skip empty arrays if (Array.isArray(value) && value.length === 0) { return; }