From 46ef741cf2cfd71284e84ab0974f11bcaa9a47c6 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 5 Sep 2023 11:20:56 -0700 Subject: [PATCH] coerces string representations when selecting clients. --- src/cljs/auto_ap/subs.cljs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cljs/auto_ap/subs.cljs b/src/cljs/auto_ap/subs.cljs index 59e8bdfb..9d4337e8 100644 --- a/src/cljs/auto_ap/subs.cljs +++ b/src/cljs/auto_ap/subs.cljs @@ -32,6 +32,12 @@ (fn [db] (:selected-clients db))) + +(defn coerce-string-version [x] + (if (string? x) + (js/parseInt x) + x)) + (re-frame/reg-sub ::selected-clients :<- [::selected-clients-raw] @@ -53,7 +59,8 @@ clients (sequential? selected-clients) - (filter (comp (set selected-clients) :id) clients) + (filter (comp (set (map coerce-string-version selected-clients)) coerce-string-version :id) + clients) :else nil)))