From 67138ac6297cd5baf16c7a2f19f7ec8341f99686 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 16 Mar 2021 16:37:59 +0100 Subject: [PATCH] :bug: Properly handle nil values on style conversion. --- frontend/src/app/util/text_editor.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/util/text_editor.cljs b/frontend/src/app/util/text_editor.cljs index 3d90a73c1..31db83fe1 100644 --- a/frontend/src/app/util/text_editor.cljs +++ b/frontend/src/app/util/text_editor.cljs @@ -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)))