From 602c26a123f8893d3c7af63e2afa2a27f1c4a7b1 Mon Sep 17 00:00:00 2001 From: terwer Date: Sun, 6 Aug 2023 10:56:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=86=E5=8F=91=E5=88=A0=E9=99=A4=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/composables/usePublish.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/composables/usePublish.ts b/src/composables/usePublish.ts index 9e375263..146dd1fd 100644 --- a/src/composables/usePublish.ts +++ b/src/composables/usePublish.ts @@ -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)