We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb9f987 commit e3e1f0aCopy full SHA for e3e1f0a
1 file changed
src/lambdaisland/deep_diff2/manipulate.cljc
@@ -31,13 +31,11 @@
31
(postwalk
32
(fn [x]
33
(cond
34
- (map-entry? x) (cond
35
- (diff-item? (key x)) (do
36
- ;(println "cond 1, keep" x)
37
- x)
38
- (has-diff-item? (val x)) (do
39
- ;(println "cond 2, keep" x)
40
- x))
+ (map-entry? x) (when ;; Either k or v of a map-entry contains/is? diff-item,
+ ;; keep the map-entry. Otherwise, remove it.
+ (or (diff-item? (key x))
+ (has-diff-item? (val x)))
+ x)
41
:else x))
42
diff))
43
0 commit comments