Merge pull request #3284 from penpot/hiru-fix-blend-mode-validation

🐛 Flix blend mode validation when importing svg
This commit is contained in:
Alejandro 2023-06-09 11:26:02 +02:00 committed by GitHub
commit b73ab97556
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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]