Bump to v4.5.1.

This commit is contained in:
John-David Dalton
2016-02-21 20:40:07 -08:00
parent ae51b52aa1
commit 65e5d998b3
29 changed files with 266 additions and 188 deletions

View File

@@ -1,7 +1,7 @@
define(['./_baseCreate', './isFunction', './_isPrototype'], function(baseCreate, isFunction, isPrototype) {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/** Built-in value references. */
var getPrototypeOf = Object.getPrototypeOf;
/**
* Initializes an object clone.
@@ -11,11 +11,9 @@ define(['./_baseCreate', './isFunction', './_isPrototype'], function(baseCreate,
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
if (isPrototype(object)) {
return {};
}
var Ctor = object.constructor;
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
return (isFunction(object.constructor) && !isPrototype(object))
? baseCreate(getPrototypeOf(object))
: {};
}
return initCloneObject;