From 6c6f49dc25fa044e95670edfe1ef6a2dd15943e6 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Mon, 30 Sep 2019 21:00:02 -0700 Subject: [PATCH] fixes rule --- src/cljs/auto_ap/subs.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cljs/auto_ap/subs.cljs b/src/cljs/auto_ap/subs.cljs index 742e31e8..4e88f621 100644 --- a/src/cljs/auto_ap/subs.cljs +++ b/src/cljs/auto_ap/subs.cljs @@ -77,12 +77,12 @@ (re-frame/reg-sub ::locations-for-client-or-bank-account (fn [db [_ client-id bank-account-id]] - (let [client (get (:clients db) (or client (:client db))) + (let [client (get (:clients db) (or client-id (:client db))) client-locations (:locations client) bank-account-locations (-> (by :id (:bank-accounts client)) (get bank-account-id) :locations)] - (or bank-account-locations client-locations)))) + (or (seq bank-account-locations) client-locations)))) (re-frame/reg-sub ::clients-by-id