mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Bump to v4.0.0.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import baseCreate from './baseCreate';
|
||||
import isFunction from '../isFunction';
|
||||
|
||||
/**
|
||||
* Initializes an object clone.
|
||||
*
|
||||
@@ -7,10 +10,7 @@
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
var Ctor = object.constructor;
|
||||
if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
|
||||
Ctor = Object;
|
||||
}
|
||||
return new Ctor;
|
||||
return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
|
||||
}
|
||||
|
||||
export default initCloneObject;
|
||||
|
||||
Reference in New Issue
Block a user