diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignHeaderMenu.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignHeaderMenu.js index 75250d800..ba020515a 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignHeaderMenu.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignHeaderMenu.js @@ -102,6 +102,10 @@ const DesignHeaderMenu = () => { const chosenPattern = patterns[ idx ]; + if ( chosenPattern.slug === selectedPattern ) { + return true; + } + setSelectedPattern( chosenPattern.slug ); currentData.data.partHeader = chosenPattern.slug; setCurrentOnboardingData( currentData ); diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js index b0833b2e4..580d3abc4 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignThemeStylesPreview.js @@ -44,7 +44,10 @@ const DesignThemeStylesPreview = () => { if ( document.getElementsByClassName( 'theme-styles-preview--drawer__list__item__title-bar--selected' - ) + ) && + document.getElementsByClassName( + 'theme-styles-preview--drawer__list__item__title-bar--selected' + )[ 0 ] ) { document .getElementsByClassName( diff --git a/src/OnboardingSPA/pages/Steps/SitePages/index.js b/src/OnboardingSPA/pages/Steps/SitePages/index.js index 45af27333..f8266ebf8 100644 --- a/src/OnboardingSPA/pages/Steps/SitePages/index.js +++ b/src/OnboardingSPA/pages/Steps/SitePages/index.js @@ -66,7 +66,7 @@ const StepSitePages = () => { } else { const selectedPages = sitePagesResponse.body.reduce( ( pages, sitePage ) => { - return sitePage?.selected && sitePage.selected + return sitePage?.selected ? pages.concat( sitePage.slug ) : pages; },