mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
🐛 Don't raise an unexpected exception on multiple-input enter
When a enter is pressed and field is empty
This commit is contained in:
parent
c4941bb102
commit
bd6f1bef10
1 changed files with 2 additions and 1 deletions
|
@ -483,7 +483,8 @@
|
||||||
|
|
||||||
;; Empty values means "submit" the form (whent some items have been added
|
;; Empty values means "submit" the form (whent some items have been added
|
||||||
(when (and (kbd/enter? event) (str/empty? @value) (not-empty @items))
|
(when (and (kbd/enter? event) (str/empty? @value) (not-empty @items))
|
||||||
(on-submit form))
|
(when (fn? on-submit)
|
||||||
|
(on-submit form event)))
|
||||||
|
|
||||||
;; If we have a string in the input we add it only if valid
|
;; If we have a string in the input we add it only if valid
|
||||||
(when (and (valid-item-fn val) (not (str/empty? @value)))
|
(when (and (valid-item-fn val) (not (str/empty? @value)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue