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:
Jon Jaques 2019-12-06 17:05:28 -06:00 committed by atscott
parent 995adb2297
commit d28197db15
1 changed files with 5 additions and 5 deletions

View File

@ -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) {