Skip to content

Commit f2683e9

Browse files
author
Bob Strahan
committed
fix feature delete
1 parent 97ce0e6 commit f2683e9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/ui/src/components/configuration-layout/ConfigurationLayout.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,18 @@ const ConfigurationLayout = () => {
521521

522522
// Handle arrays
523523
if (Array.isArray(current)) {
524-
if (!Array.isArray(defaultObj) || current.length !== defaultObj.length) {
524+
if (!Array.isArray(defaultObj)) {
525+
return { [path]: current };
526+
}
527+
528+
// Special case: if current array is empty but default is not empty,
529+
// we need to explicitly save the empty array to override the default
530+
if (current.length === 0 && defaultObj.length > 0) {
531+
return { [path]: current };
532+
}
533+
534+
// If lengths are different, arrays are different
535+
if (current.length !== defaultObj.length) {
525536
return { [path]: current };
526537
}
527538

0 commit comments

Comments
 (0)