From 507bf7445bd6eb19ff7cef0acf9a1e1191fcbb54 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 12 Dec 2025 09:52:33 +0100 Subject: [PATCH] :bug: Fix tokens-lib encoding when value is nilable --- common/src/app/common/types/tokens_lib.cljc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/app/common/types/tokens_lib.cljc b/common/src/app/common/types/tokens_lib.cljc index 70e36bfc2f..90fd5a52ec 100644 --- a/common/src/app/common/types/tokens_lib.cljc +++ b/common/src/app/common/types/tokens_lib.cljc @@ -1410,8 +1410,8 @@ Will return a value that matches this schema: ;; NOTE: we can't assign statically at eval time the value of a ;; function that is declared but not defined; so we need to pass ;; an anonymous function and delegate the resolution to runtime - {:encode/json #(export-dtcg-json %) - :decode/json #(read-multi-set-dtcg %) + {:encode/json #(some-> % export-dtcg-json) + :decode/json #(some-> % read-multi-set-dtcg) ;; FIXME: add better, more reallistic generator :gen/gen (->> (sg/small-int) (sg/fmap (fn [_]