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

View File

@ -42,13 +42,13 @@ export function propertyPatch() {
return obj; return obj;
}; };
Object.create = <any>function(obj: any, proto: any) { Object.create = <any>function(proto: any, propertiesObject: any) {
if (typeof proto === 'object' && !Object.isFrozen(proto)) { if (typeof propertiesObject === 'object' && !Object.isFrozen(propertiesObject)) {
Object.keys(proto).forEach(function(prop) { Object.keys(propertiesObject).forEach(function(prop) {
proto[prop] = rewriteDescriptor(obj, prop, proto[prop]); propertiesObject[prop] = rewriteDescriptor(proto, prop, propertiesObject[prop]);
}); });
} }
return _create(obj, proto); return _create(proto, propertiesObject);
}; };
Object.getOwnPropertyDescriptor = function(obj, prop) { Object.getOwnPropertyDescriptor = function(obj, prop) {