0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-07 15:39:42 -05:00

🐛 fix error when posting an empty comment

This commit is contained in:
Eva 2022-02-09 16:08:55 +01:00 committed by Andrés Moya
parent 528839cde2
commit e1348725c1
2 changed files with 5 additions and 2 deletions

View file

@ -27,6 +27,7 @@
### :bug: Bugs fixed
- Fixed error when trying to post an empty comment [Taiga #2603](https://tree.taiga.io/project/penpot/issue/2603)
- Fixed missing translation strings [Taiga #2786](https://tree.taiga.io/project/penpot/issue/2786)
- Fixed color palette outside viewport [Taiga #2715](https://tree.taiga.io/project/penpot/issue/2715)
- Fixed missing translate string [Taiga #2780](https://tree.taiga.io/project/penpot/issue/2780)

View file

@ -18,6 +18,7 @@
[app.util.keyboard :as kbd]
[app.util.object :as obj]
[app.util.time :as dt]
[cuerdas.core :as str]
[okulary.core :as l]
[rumext.alpha :as mf]))
@ -104,7 +105,7 @@
(when (or @show-buttons?
(seq @content))
[:div.buttons
[:input.btn-primary {:type "button" :value "Post" :on-click on-submit}]
[:input.btn-primary {:type "button" :value "Post" :on-click on-submit :disabled (str/empty-or-nil? @content)}]
[:input.btn-secondary {:type "button" :value "Cancel" :on-click on-cancel}]])]))
(mf/defc draft-thread
@ -154,7 +155,8 @@
[:input.btn-primary
{:on-click on-submit
:type "button"
:value "Post"}]
:value "Post"
:disabled (str/empty-or-nil? content)}]
[:input.btn-secondary
{:on-click on-esc
:type "button"