From d7cf39032d98b73a1c7fb97da62eb519c063c628 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Fri, 22 Sep 2023 18:06:34 +0800 Subject: [PATCH] fix(e2e): fix e2e publish button disable error --- src/views/Me/DraftDetail/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/Me/DraftDetail/index.tsx b/src/views/Me/DraftDetail/index.tsx index 498c226491..c72438841f 100644 --- a/src/views/Me/DraftDetail/index.tsx +++ b/src/views/Me/DraftDetail/index.tsx @@ -137,8 +137,13 @@ const DraftDetail = () => { draft?.content && stripHtml(draft.content).trim().length > 0 const hasTitle = draft?.title && draft.title.length > 0 const isUnpublished = draft?.publishState === 'unpublished' - const publishable = - id && isUnpublished && hasContent && hasTitle && hasValidSummary + const publishable = !!( + id && + isUnpublished && + hasContent && + hasTitle && + hasValidSummary + ) const upload = async (input: { [key: string]: any }) => { const result = await singleFileUpload({