Skip to content

Commit

Permalink
Merge pull request #3840 from thematters/fix/e2e-publish-btns-disable…
Browse files Browse the repository at this point in the history
…-error

fix(e2e): fix e2e publish button disable error
  • Loading branch information
wlliaml authored Sep 22, 2023
2 parents 9441915 + d7cf390 commit 5e9033a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/views/Me/DraftDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

1 comment on commit 5e9033a

@vercel
Copy link

@vercel vercel bot commented on 5e9033a Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.