Skip to content

Commit 258ba4b

Browse files
authored
Merge pull request #40 from christopherthielen/master
fix(BindAll): Copy original function name to wrapper
2 parents 4b187f7 + 73b8537 commit 258ba4b

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)