refactor(zone.js): update Object.create params to match web platform (#34287)
This commit updates `Object.create` argument names used in Zone.js to match web platform. PR Close #34287
This commit is contained in:
parent
995adb2297
commit
d28197db15
|
@ -42,13 +42,13 @@ export function propertyPatch() {
|
|||
return obj;
|
||||
};
|
||||
|
||||
Object.create = <any>function(obj: any, proto: any) {
|
||||
if (typeof proto === 'object' && !Object.isFrozen(proto)) {
|
||||
Object.keys(proto).forEach(function(prop) {
|
||||
proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);
|
||||
Object.create = <any>function(proto: any, propertiesObject: any) {
|
||||
if (typeof propertiesObject === 'object' && !Object.isFrozen(propertiesObject)) {
|
||||
Object.keys(propertiesObject).forEach(function(prop) {
|
||||
propertiesObject[prop] = rewriteDescriptor(proto, prop, propertiesObject[prop]);
|
||||
});
|
||||
}
|
||||
return _create(obj, proto);
|
||||
return _create(proto, propertiesObject);
|
||||
};
|
||||
|
||||
Object.getOwnPropertyDescriptor = function(obj, prop) {
|
||||
|
|
Loading…
Reference in New Issue