Skip to content

Commit 73b8537

Browse files
fix(BindAll): Copy original function name to wrapper
1 parent 4b187f7 commit 73b8537

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/utils/wrapConstructor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export function wrapConstructor(Ctor: Function, wrapper: (Ctor: Function, ...arg
2222
}
2323

2424
ConstructorWrapper.prototype = Ctor.prototype;
25+
Object.defineProperty(ConstructorWrapper, 'name', { writable: true });
26+
(ConstructorWrapper as any).name = Ctor.name;
2527

2628
return assignAll(ConstructorWrapper, Ctor, PROPERTY_EXCLUDES);
2729
}

0 commit comments

Comments
 (0)