From 8c76dad3c00bb789a9245e01107d574ca26c977f Mon Sep 17 00:00:00 2001 From: sechi Date: Sun, 29 Jan 2023 06:00:20 +0800 Subject: [PATCH] fix: prevent click event when publish button is disabled (#1481) --- composables/masto/publish.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composables/masto/publish.ts b/composables/masto/publish.ts index 08498d1e..b57466c5 100644 --- a/composables/masto/publish.ts +++ b/composables/masto/publish.ts @@ -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}`