mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-05 16:44:22 +00:00
Improve cleanup of options in InstanceDialog to skip empty strings and arrays
This commit is contained in:
@@ -123,8 +123,12 @@ const InstanceDialog: React.FC<InstanceDialogProps> = ({
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user