Skip to content

Commit

Permalink
fix(BindAll): Copy original function name to wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Nov 2, 2017
1 parent 4b187f7 commit 73b8537
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/wrapConstructor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export function wrapConstructor(Ctor: Function, wrapper: (Ctor: Function, ...arg
}

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

return assignAll(ConstructorWrapper, Ctor, PROPERTY_EXCLUDES);
}

0 comments on commit 73b8537

Please sign in to comment.