Skip to content

Commit

Permalink
fix(nestjs): use process.nextTick instead of resolved Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Feb 22, 2021
1 parent b31720c commit 4dd8da6
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;
Promise.resolve().then(() => this.mapper.addProfile(this.mapProfile()));
process.nextTick(() => this.mapper.addProfile(this.mapProfile()));
}

abstract mapProfile(): MappingProfile;
Expand Down

0 comments on commit 4dd8da6

Please sign in to comment.