mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Rename var chain to chainAll in _.mixin.
This commit is contained in:
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user