Skip to content

Commit

Permalink
fix: 修复批量分发删除异常问题
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 6, 2023
1 parent 55ead01 commit 602c26a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/composables/usePublish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,10 @@ const usePublish = () => {
singleFormData.publishProcessStatus = await api.deletePost(postid)

// 删除成功才去移除文章发布信息
if (!StrUtil.isEmptyString(posidKey)) {
if (singleFormData.publishProcessStatus) {
const postMeta = singleFormData.setting[id] ?? {}
const updatedPostMeta = { ...postMeta }
if (updatedPostMeta.hasOwnProperty(posidKey)) {
delete updatedPostMeta[posidKey]
}
delete updatedPostMeta[posidKey]

singleFormData.setting[id] = updatedPostMeta
await updateSetting(singleFormData.setting)
Expand Down

0 comments on commit 602c26a

Please sign in to comment.