0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

🐛 Properly handle nil values on style conversion.

This commit is contained in:
Andrey Antukh 2021-03-16 16:37:59 +01:00
parent b816e0ed32
commit 67138ac629

View file

@ -30,7 +30,7 @@
(number? v) (str "n:" v)
(keyword? v) (str "k:" (name v))
(map? v) (str "m:" (t/encode v))
(nil? v) (str "z:null")
:else (str "o:" v)))
(defn decode-style-value
@ -41,6 +41,7 @@
"n:" (js/Number (subs v 2))
"k:" (keyword (subs v 2))
"m:" (t/decode (subs v 2))
"z:" nil
"o:" (subs v 2)
v)))