Rename var chain to chainAll in _.mixin.

This commit is contained in:
John-David Dalton
2014-10-02 09:47:11 -07:00
parent 3ca626f2a9
commit ad10a1eba5

View File

@@ -9240,7 +9240,7 @@
* // => ['e'] * // => ['e']
*/ */
function mixin(object, source, options) { function mixin(object, source, options) {
var chain = true, var chainAll = true,
isObj = isObject(source), isObj = isObject(source),
noOpts = options == null, noOpts = options == null,
props = noOpts && isObj && keys(source), props = noOpts && isObj && keys(source),
@@ -9256,9 +9256,9 @@
} }
methodNames || (methodNames = baseFunctions(source, keys(source))); methodNames || (methodNames = baseFunctions(source, keys(source)));
if (options === false) { if (options === false) {
chain = false; chainAll = false;
} else if (isObject(options) && 'chain' in options) { } else if (isObject(options) && 'chain' in options) {
chain = options.chain; chainAll = options.chain;
} }
var index = -1, var index = -1,
isFunc = isFunction(object), isFunc = isFunction(object),
@@ -9270,7 +9270,7 @@
if (isFunc) { if (isFunc) {
object.prototype[methodName] = (function(methodName) { object.prototype[methodName] = (function(methodName) {
return function() { return function() {
if (chain || this.__chain__) { if (chainAll || this.__chain__) {
var result = object(this.__wrapped__); var result = object(this.__wrapped__);
result.__chain__ = true; result.__chain__ = true;
(result.__queue__ = baseSlice(this.__queue__)).push({ 'name': methodName, 'object': object, 'args': arguments }); (result.__queue__ = baseSlice(this.__queue__)).push({ 'name': methodName, 'object': object, 'args': arguments });