Skip to content

Commit

Permalink
Merge pull request #4999 from thematters/hotfix/edit-article-campaign…
Browse files Browse the repository at this point in the history
…-error

hotfix(ArticleDetail): simplify campaign reset condition
  • Loading branch information
Kechicode authored Dec 17, 2024
2 parents e3201cd + 27a3e92 commit 26f7631
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/views/ArticleDetail/Edit/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit 26f7631

Please sign in to comment.