fix: empty code blocks (#978)

pull/980/head
Kerunix 2023-01-11 21:55:47 +01:00 zatwierdzone przez GitHub
rodzic 689ae0c701
commit 67f58a3335
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -83,7 +83,7 @@ export const isEmptyDraft = (draft: Draft | null | undefined) => {
return true
const { params, attachments } = draft
const status = params.status || ''
const text = htmlToText(status).trim().replace(/^(@\S+\s?)+/, '').trim()
const text = htmlToText(status).trim().replace(/^(@\S+\s?)+/, '').replaceAll(/```/g, '').trim()
return (text.length === 0)
&& attachments.length === 0