We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e6f465 commit 8ceb204Copy full SHA for 8ceb204
src/cljc/proton/core.cljc
@@ -198,7 +198,7 @@
198
"Recursively merges maps."
199
[& maps]
200
(letfn [(m [& xs]
201
- (if (some #(and (map? %) (not (record? %))) xs)
+ (if (every? #(and (map? %) (not (record? %))) xs)
202
(apply merge-with m xs)
203
(last xs)))]
204
(reduce m maps)))
test/proton/core_test.cljc
@@ -161,4 +161,6 @@
161
(is (= (core/deep-merge {:foo {:bar 1}} {:foo {:baz 2}})
162
{:foo {:bar 1 :baz 2}}))
163
(is (= (core/deep-merge {:foo {:bar 1}} {:baz 2})
164
- {:foo {:bar 1} :baz 2})))
+ {:foo {:bar 1} :baz 2}))
165
+ (is (= (core/deep-merge {:foo 1} {:foo {:baz 2}})
166
+ {:foo {:baz 2}})))
0 commit comments