Skip to content

Commit

Permalink
fix(nestjs): revert back to resolved Promise. nextTick seems to run a…
Browse files Browse the repository at this point in the history
… little behind
  • Loading branch information
nartc committed Feb 24, 2021
1 parent d223d79 commit 5a91c31
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export abstract class AutomapperProfile {

protected constructor(mapper: Mapper) {
this.mapper = mapper;
process.nextTick(() => this.mapper.addProfile(this.mapProfile()));
Promise.resolve().then(() => this.mapper.addProfile(this.mapProfile()));
}

abstract mapProfile(): MappingProfile;
Expand Down

0 comments on commit 5a91c31

Please sign in to comment.