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.
*/
var baseCreate = (function() {
function Object() {}
function object() {}
return function(prototype) {
if (isObject(prototype)) {
Object.prototype = prototype;
var result = new Object;
Object.prototype = null;
object.prototype = prototype;
var result = new object;
object.prototype = null;
}
return result || context.Object();
return result || {};
};
}());