File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,17 @@ export const CallableInstance =
26
26
27
27
Object . setPrototypeOf ( apply , proto )
28
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
- }
29
+ // Not needed for us in `unified`: we only call this on the `copy`
30
+ // function,
31
+ // and we don't need to add its fields (`length`, `name`)
32
+ // over.
33
+ // See also: GH-246.
34
+ // 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
+ // }
35
40
36
41
return apply
37
42
}
You can’t perform that action at this time.
0 commit comments