diff --git a/lib/callable-instance.js b/lib/callable-instance.js index 3e46cabf..5f20c5e5 100644 --- a/lib/callable-instance.js +++ b/lib/callable-instance.js @@ -26,12 +26,17 @@ export const CallableInstance = Object.setPrototypeOf(apply, proto) - const names = Object.getOwnPropertyNames(value) - - for (const p of names) { - const descriptor = Object.getOwnPropertyDescriptor(value, p) - if (descriptor) Object.defineProperty(apply, p, descriptor) - } + // Not needed for us in `unified`: we only call this on the `copy` + // function, + // and we don't need to add its fields (`length`, `name`) + // over. + // See also: GH-246. + // const names = Object.getOwnPropertyNames(value) + // + // for (const p of names) { + // const descriptor = Object.getOwnPropertyDescriptor(value, p) + // if (descriptor) Object.defineProperty(apply, p, descriptor) + // } return apply }