0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-28 09:46:51 -05:00

🐛 Fix avoid enabling post button if blank comment

This commit is contained in:
Luis de Dios 2025-02-25 18:09:22 +01:00
parent 06b5304926
commit 5754c393b9

View file

@ -132,10 +132,11 @@
(defn- blank-content?
[content]
(or (str/blank? content)
(str/empty? content)
;; If only one char and it's the zero-width whitespace
(and (= 1 (count content)) (= (first content) zero-width-space))))
(let [content (str/trim content)]
(or (str/blank? content)
(str/empty? content)
(and (= (count content) 1)
(= (first content) zero-width-space)))))
;; Component that renders the component content
(mf/defc comment-content*