1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-10-04 18:00:00 +01:00

fix: prevent click event when publish button is disabled (#1481)

This commit is contained in:
sechi 2023-01-29 06:00:20 +08:00 committed by GitHub
parent ca65f7379e
commit 8c76dad3c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,8 @@ export const usePublish = (options: {
}, { deep: true })
async function publishDraft() {
if (isPublishDisabled)
return
let content = htmlToText(draft.params.status || '')
if (draft.mentions?.length)
content = `${draft.mentions.map(i => `@${i}`).join(' ')} ${content}`