From 6e0c754f649680bc5481e650fd17a0ac3d770a29 Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Wed, 23 Oct 2024 08:34:48 +0800 Subject: [PATCH] Fix "Finish setup" icon remains if tasks are disabled without being completed (#52204) * Fix "Finish setup" icon remains if tasks are disabled without being completed * Add changelog * Remove console --- .../woocommerce/changelog/fix-finish-setup-icon-display-logic | 4 ++++ .../client/admin/client/activity-panel/activity-panel.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce/changelog/fix-finish-setup-icon-display-logic diff --git a/plugins/woocommerce/changelog/fix-finish-setup-icon-display-logic b/plugins/woocommerce/changelog/fix-finish-setup-icon-display-logic new file mode 100644 index 00000000000..81bcd58815b --- /dev/null +++ b/plugins/woocommerce/changelog/fix-finish-setup-icon-display-logic @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix "Finish setup" icon remains if tasks are disabled without being completed diff --git a/plugins/woocommerce/client/admin/client/activity-panel/activity-panel.js b/plugins/woocommerce/client/admin/client/activity-panel/activity-panel.js index 47373cf8e88..15964df125c 100644 --- a/plugins/woocommerce/client/admin/client/activity-panel/activity-panel.js +++ b/plugins/woocommerce/client/admin/client/activity-panel/activity-panel.js @@ -180,7 +180,7 @@ export const ActivityPanel = ( { isEmbedded, query } ) => { const setupList = activeSetupList && getTaskList( activeSetupList ); - const isSetupTaskListHidden = setupList?.isHidden ?? false; + const isSetupTaskListHidden = setupList ? setupList.isHidden : true; // If setupList is null, it means the setup task list is disabled. const setupVisibleTasks = getVisibleTasks( setupList?.tasks || [] ); const extendedTaskList = getTaskList( 'extended' );