From 37f23855e873f30ad1f404254f14d73eec876ca3 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 8 Aug 2024 09:52:51 +0200 Subject: [PATCH] Fix re-find only accepting string values throw --- frontend/src/app/main/ui/workspace/tokens/token.cljs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/token.cljs b/frontend/src/app/main/ui/workspace/tokens/token.cljs index 92591f14a2..8d967151b3 100644 --- a/frontend/src/app/main/ui/workspace/tokens/token.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/token.cljs @@ -8,9 +8,10 @@ #"^\s*(-?[0-9]+\.?[0-9]*)\s*$") (defn parse-token-value [value] - (when-let [double-str (-> (re-find parseable-token-value-regexp value) - (last))] - (d/parse-double double-str))) + (when (string? value) + (when-let [double-str (-> (re-find parseable-token-value-regexp value) + (last))] + (d/parse-double double-str)))) (defn find-token-references "Finds token reference values in `value-string` and returns a set with all contained namespaces."