@@ -497,16 +497,11 @@ const CallableInstance =
|
497 | 497 | const proto = ( |
498 | 498 | constr.prototype |
499 | 499 | ); |
500 | | - const func = proto[property]; |
| 500 | + const value = proto[property]; |
501 | 501 | const apply = function () { |
502 | | - return func.apply(apply, arguments) |
| 502 | + return value.apply(apply, arguments) |
503 | 503 | }; |
504 | 504 | Object.setPrototypeOf(apply, proto); |
505 | | - const names = Object.getOwnPropertyNames(func); |
506 | | - for (const p of names) { |
507 | | - const descriptor = Object.getOwnPropertyDescriptor(func, p); |
508 | | - if (descriptor) Object.defineProperty(apply, p, descriptor); |
509 | | - } |
510 | 505 | return apply |
511 | 506 | } |
512 | 507 | ) |
|