Permalink
Browse files

Ensure `_.merge` works with `_.reduce`.

  • Loading branch information...
1 parent 1306b50 commit ad8102692f90c84bd6f41f2518c6668d26848886 @jdalton jdalton committed Nov 12, 2012
Showing with 42 additions and 34 deletions.
  1. +2 −2 lodash.js
  2. +32 −32 lodash.min.js
  3. +8 −0 test/test.js
View
@@ -1630,7 +1630,7 @@
stackA = args[3],
stackB = args[4];
- if (indicator !== objectRef) {
+ if (typeof indicator != 'number' && indicator !== indicatorObject) {
stackA = [];
stackB = [];
length = args.length;
@@ -1658,7 +1658,7 @@
: (isPlainObject(value) ? value : {})
);
// recursively merge objects and arrays (susceptible to call stack limits)
- object[key] = merge(value, source, objectRef, stackA, stackB);
+ object[key] = merge(value, source, indicatorObject, stackA, stackB);
}
} else if (source != null) {
object[key] = source;
Oops, something went wrong.

0 comments on commit ad81026

Please sign in to comment.