diff --git a/src/cljc/proton/core.cljc b/src/cljc/proton/core.cljc index 916de66..8db146a 100644 --- a/src/cljc/proton/core.cljc +++ b/src/cljc/proton/core.cljc @@ -198,7 +198,7 @@ "Recursively merges maps." [& maps] (letfn [(m [& xs] - (if (some #(and (map? %) (not (record? %))) xs) + (if (every? #(and (map? %) (not (record? %))) xs) (apply merge-with m xs) (last xs)))] (reduce m maps))) diff --git a/test/proton/core_test.cljc b/test/proton/core_test.cljc index 351bf4f..de019a2 100644 --- a/test/proton/core_test.cljc +++ b/test/proton/core_test.cljc @@ -161,4 +161,6 @@ (is (= (core/deep-merge {:foo {:bar 1}} {:foo {:baz 2}}) {:foo {:bar 1 :baz 2}})) (is (= (core/deep-merge {:foo {:bar 1}} {:baz 2}) - {:foo {:bar 1} :baz 2}))) + {:foo {:bar 1} :baz 2})) + (is (= (core/deep-merge {:foo 1} {:foo {:baz 2}}) + {:foo {:baz 2}})))