Skip to content

Commit 2cc028e

Browse files
committed
Fix profiles merging when using expand
1 parent cc30aa4 commit 2cc028e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/integrant/core.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@
551551
(walk/postwalk #(if (profile? %) (deprofile-1 % profile-keys) %) coll)))
552552

553553
(defn- normal-map? [x]
554-
(and (map? x) (not (reflike? x))))
554+
(and (map? x) (not (reflike? x)) (not (profile? x))))
555555

556556
(defn- nested-values [idx [k v]]
557557
(if (and (normal-map? v) (seq v))

test/integrant/core_test.cljc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,4 +731,8 @@
731731
(is (= (ig/expand {::mod-prof 1} (ig/deprofile [:dev]))
732732
{::a {:dev 1}}))
733733
(is (= (ig/expand {::mod-prof 2} (ig/deprofile [:test]))
734-
{::a {:test 2}}))))
734+
{::a {:test 2}}))
735+
(is (= (-> {::x (ig/profile {:a 1, :b 2})}
736+
(ig/expand (ig/deprofile [:a]))
737+
(ig/deprofile [:a]))
738+
{::x 1}))))

0 commit comments

Comments
 (0)