Skip to content

Commit

Permalink
Fix profiles merging when using expand
Browse files Browse the repository at this point in the history
  • Loading branch information
weavejester committed Oct 12, 2024
1 parent cc30aa4 commit 2cc028e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/integrant/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
(walk/postwalk #(if (profile? %) (deprofile-1 % profile-keys) %) coll)))

(defn- normal-map? [x]
(and (map? x) (not (reflike? x))))
(and (map? x) (not (reflike? x)) (not (profile? x))))

(defn- nested-values [idx [k v]]
(if (and (normal-map? v) (seq v))
Expand Down
6 changes: 5 additions & 1 deletion test/integrant/core_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -731,4 +731,8 @@
(is (= (ig/expand {::mod-prof 1} (ig/deprofile [:dev]))
{::a {:dev 1}}))
(is (= (ig/expand {::mod-prof 2} (ig/deprofile [:test]))
{::a {:test 2}}))))
{::a {:test 2}}))
(is (= (-> {::x (ig/profile {:a 1, :b 2})}
(ig/expand (ig/deprofile [:a]))
(ig/deprofile [:a]))
{::x 1}))))

0 comments on commit 2cc028e

Please sign in to comment.