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:
parent
06b5304926
commit
5754c393b9
1 changed files with 5 additions and 4 deletions
|
@ -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*
|
||||
|
|
Loading…
Add table
Reference in a new issue