This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-20
Channels
- # admin-announcements (1)
- # announcements (1)
- # beginners (115)
- # calva (31)
- # cider (25)
- # clj-kondo (47)
- # cljdoc (23)
- # cljs-dev (5)
- # clojars (1)
- # clojure (60)
- # clojure-australia (1)
- # clojure-europe (23)
- # clojure-nl (3)
- # clojure-norway (2)
- # clojure-spec (3)
- # clojure-uk (18)
- # clojurescript (49)
- # community-development (1)
- # cursive (4)
- # datahike (2)
- # datascript (3)
- # datomic (36)
- # deps-new (2)
- # emacs (2)
- # events (9)
- # fulcro (6)
- # graphql (2)
- # gratitude (13)
- # holy-lambda (1)
- # introduce-yourself (10)
- # macro (2)
- # malli (5)
- # meander (9)
- # news-and-articles (5)
- # nextjournal (1)
- # off-topic (32)
- # pathom (17)
- # pedestal (13)
- # polylith (4)
- # protojure (4)
- # reagent (4)
- # sci (27)
- # shadow-cljs (2)
- # show-and-tell (2)
- # specter (3)
- # tools-deps (7)
- # xtdb (16)
@pt.roterski haven't tested it yet to confirm, but i think there's a small bug in the [adapter](https://github.com/roterski/fulcro-rad-crux/blob/d643d7ce600c242d7e1e85f2819e4e3041f75d24/src/main/roterski/fulcro/rad/database_adapters/crux/wrap_crux_save.clj#L21) -> the and
expression tests v
but an attr with v
being false
should be kept as well. Testing with (some? v)
is probably what is needed here. What do you think? I can log an issue later if you like.
Nice find @U052A8RUT ! Thank you for reading through this code. Let's think. This is the context:
(reduce (fn [e [k v]]
(cond-> e
(and v (get e k)) (assoc k v)))
entity
before)
We go over a seq of maps before
, and if condition (and v (get e k))
is truthy a value v
will be associated assoc
under key k
in entity
e.
If v
is false
:
(and false 5)
;; => false
(and (some? false) 5)
;; => 5
without (some? v)
false
values get silently ignored. That's not an expected behaviour.
You are right, this is a bug and I'll fix this.Thanks again for finding it, I appreciate it. 🙏 Feel free to use https://github.com/roterski/fulcro-rad-crux/issues for more persistent issue tracker.
@U052A8RUT just an update, I've pushed a fix together with a test case catching the bug https://github.com/roterski/fulcro-rad-crux/pull/3 and then released it as 0.0.1-alpha-4
Great!