Ensure baseCreate works in ExtendScript.

This commit is contained in:
jdalton
2015-05-03 13:47:40 -07:00
parent 13fe88c03f
commit 7e4ed7c1a9

View File

@@ -1975,14 +1975,14 @@
* @returns {Object} Returns the new object. * @returns {Object} Returns the new object.
*/ */
var baseCreate = (function() { var baseCreate = (function() {
function Object() {} function object() {}
return function(prototype) { return function(prototype) {
if (isObject(prototype)) { if (isObject(prototype)) {
Object.prototype = prototype; object.prototype = prototype;
var result = new Object; var result = new object;
Object.prototype = null; object.prototype = null;
} }
return result || context.Object(); return result || {};
}; };
}()); }());