From 27a3e9283c19ae6b2bbfb036b9b26d6ca3712329 Mon Sep 17 00:00:00 2001 From: Kechicode <186776112+Kechicode@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:41:14 +0800 Subject: [PATCH] fix(ArticleDetail): simplify campaign reset condition --- src/views/ArticleDetail/Edit/Header/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/views/ArticleDetail/Edit/Header/index.tsx b/src/views/ArticleDetail/Edit/Header/index.tsx index 105271b6e0..a758504b49 100644 --- a/src/views/ArticleDetail/Edit/Header/index.tsx +++ b/src/views/ArticleDetail/Edit/Header/index.tsx @@ -99,9 +99,7 @@ const EditModeHeader = ({ const isCampaignRevised = restProps.selectedCampaign?.id !== article.campaigns[0]?.campaign.id || restProps.selectedStage !== article.campaigns[0]?.stage?.id - const isResetCampaign = - isCampaignRevised && - (!restProps.selectedCampaign?.id || !restProps.selectedStage) + const isResetCampaign = isCampaignRevised && !restProps.selectedCampaign?.id const needRepublish = isTitleRevised ||