🐛 Flix blend mode validation when importing svg

This commit is contained in:
Andrés Moya 2023-06-07 17:30:24 +02:00
parent 55a821f193
commit 1d5d5e2499
2 changed files with 5 additions and 6 deletions

View file

@ -31,7 +31,6 @@
[app.util.svg :as usvg]
[app.util.webapi :as wapi]
[beicon.core :as rx]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[potok.core :as ptk]))
@ -67,10 +66,10 @@
str/trim
str/lower
keyword)]
(when-not (s/valid? ::cts/blend-mode clean-value)
(when-not (contains? cts/blend-modes clean-value)
(ex/raise :type :assertion
:code :expr-validation
:hint (str/ffmt "%1 is not a valid blend mode" clean-value)))
:code :expr-validation
:hint (str/ffmt "%1 is not a valid blend mode" clean-value)))
clean-value))
(defn- svg-dimensions [data]