We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69202f9 commit 1e0863aCopy full SHA for 1e0863a
1 file changed
lib/callable-instance.js
@@ -26,12 +26,17 @@ export const CallableInstance =
26
27
Object.setPrototypeOf(apply, proto)
28
29
- const names = Object.getOwnPropertyNames(value)
30
-
31
- for (const p of names) {
32
- const descriptor = Object.getOwnPropertyDescriptor(value, p)
33
- if (descriptor) Object.defineProperty(apply, p, descriptor)
34
- }
+ // 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)
35
+ //
36
+ // for (const p of names) {
37
+ // const descriptor = Object.getOwnPropertyDescriptor(value, p)
38
+ // if (descriptor) Object.defineProperty(apply, p, descriptor)
39
+ // }
40
41
return apply
42
}
0 commit comments