Add better validation for recent-color change

This commit is contained in:
Andrey Antukh 2023-11-15 16:56:51 +01:00
parent 52fbc678f3
commit 7e302cd21c
3 changed files with 7 additions and 8 deletions

View file

@ -113,7 +113,7 @@
(defn add-recent-color
[color]
(dm/assert! (ctc/recent-color? color))
(dm/assert! (ctc/valid-recent-color? color))
(ptk/reify ::add-recent-color
ptk/WatchEvent
(watch [it _ _]
@ -143,7 +143,7 @@
(defn update-color
[color file-id]
(dm/assert! (ctc/color? color))
(dm/assert! (ctc/valid-color? color))
(dm/assert! (uuid? file-id))
(ptk/reify ::update-color