From f06416b37cf0ff202ce559e642bc92c45236bee0 Mon Sep 17 00:00:00 2001 From: Kechicode <186776112+Kechicode@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:47:23 +0800 Subject: [PATCH] fix(ArticleDetail): Simplify campaign state initialization in useCampaignState hook PD-2412-1-4 --- src/views/ArticleDetail/Edit/Hooks/useCampaignState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ArticleDetail/Edit/Hooks/useCampaignState.ts b/src/views/ArticleDetail/Edit/Hooks/useCampaignState.ts index 5fa16c298d..f117621365 100644 --- a/src/views/ArticleDetail/Edit/Hooks/useCampaignState.ts +++ b/src/views/ArticleDetail/Edit/Hooks/useCampaignState.ts @@ -22,7 +22,7 @@ export const useCampaignState = (article: Article) => { }) const [campaign, setCampaign] = useState( - initialSelectedCampaign?.id && initialSelectedStage + initialSelectedCampaign?.id ? { campaign: initialSelectedCampaign.id, stage: initialSelectedStage,