From b38a3be615bcc782ee6fa843b638d8f0706c3203 Mon Sep 17 00:00:00 2001 From: Vara Date: Wed, 19 Jun 2024 16:24:32 +0530 Subject: [PATCH] Fix issue with custom fonts preview --- .../Sidebar/components/Customize/DesignFontsPanel/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OnboardingSPA/components/Sidebar/components/Customize/DesignFontsPanel/index.js b/src/OnboardingSPA/components/Sidebar/components/Customize/DesignFontsPanel/index.js index 0aebb3367..6d2d50aa8 100644 --- a/src/OnboardingSPA/components/Sidebar/components/Customize/DesignFontsPanel/index.js +++ b/src/OnboardingSPA/components/Sidebar/components/Customize/DesignFontsPanel/index.js @@ -356,6 +356,7 @@ const DesignFontsPanel = forwardRef( const handleSelectYourOwnFonts = () => { setShowCustomFonts( true ); + setSelectedGroup( 'custom' ); if ( ! selectedCustomFont ) { setIsEditingCustomFont( true ); } @@ -366,7 +367,7 @@ const DesignFontsPanel = forwardRef( }; const handleCancelCustomFonts = () => { - if ( ! selectedCustomFont ) { + if ( ! selectedCustomFont.heading || ! selectedCustomFont.body ) { setShowCustomFonts( false ); } else { setIsEditingCustomFont( false );