0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 14:12:36 -05:00

Fix re-find only accepting string values throw

This commit is contained in:
Florian Schroedl 2024-08-08 09:52:51 +02:00
parent 2e8e33d701
commit 37f23855e8

View file

@ -8,9 +8,10 @@
#"^\s*(-?[0-9]+\.?[0-9]*)\s*$") #"^\s*(-?[0-9]+\.?[0-9]*)\s*$")
(defn parse-token-value [value] (defn parse-token-value [value]
(when-let [double-str (-> (re-find parseable-token-value-regexp value) (when (string? value)
(last))] (when-let [double-str (-> (re-find parseable-token-value-regexp value)
(d/parse-double double-str))) (last))]
(d/parse-double double-str))))
(defn find-token-references (defn find-token-references
"Finds token reference values in `value-string` and returns a set with all contained namespaces." "Finds token reference values in `value-string` and returns a set with all contained namespaces."