Skip to content

Commit 011b781

Browse files
committed
Improve U.update(map1, map2).
1 parent 8aa6612 commit 011b781

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/github/underscore/lodash

1 file changed

+1
-1
lines changed

src/main/java/com/github/underscore/lodash/U.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ public static Map<String, Object> update(final Map<String, Object> map1, final M
16591659
if (map1.containsKey(key)) {
16601660
Object value1 = map1.get(key);
16611661
if (value1 instanceof Map && value2 instanceof Map) {
1662-
outMap.putAll(update((Map<String, Object>) value1, (Map<String, Object>) value2));
1662+
outMap.put(key, update((Map<String, Object>) value1, (Map<String, Object>) value2));
16631663
} else if (value1 instanceof List && value2 instanceof List) {
16641664
outMap.put(key, merge((List<Object>) value1, (List<Object>) value2));
16651665
} else {

0 commit comments

Comments
 (0)