From 2c8783e8ad0bb00a6bf18848e32073ad94ff49dc Mon Sep 17 00:00:00 2001 From: paul sealock Date: Tue, 4 Jun 2024 13:28:29 +1200 Subject: [PATCH] fix selected section --- plugins/woocommerce-admin/client/settings/section-nav.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/woocommerce-admin/client/settings/section-nav.js b/plugins/woocommerce-admin/client/settings/section-nav.js index b84da2dfcba..6573df66ab0 100644 --- a/plugins/woocommerce-admin/client/settings/section-nav.js +++ b/plugins/woocommerce-admin/client/settings/section-nav.js @@ -12,10 +12,7 @@ import classnames from 'classnames'; export const SectionNav = ( { data, section } ) => { const { sections } = data; const sectionKeys = Object.keys( sections ); - - if ( sectionKeys.length === 1 ) { - return null; - } + const selectedSection = section || sectionKeys[ 0 ]; return ( <> @@ -24,7 +21,7 @@ export const SectionNav = ( { data, section } ) => {