File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/ui/src/components/configuration-layout Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments