From 4dd8da60d4c96069b343add34bed15abb2432dfb Mon Sep 17 00:00:00 2001 From: Chau Tran Date: Mon, 22 Feb 2021 14:26:18 -0600 Subject: [PATCH] fix(nestjs): use process.nextTick instead of resolved Promise --- .../nestjs/src/lib/abstracts/automapper-profile.abstract.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nestjs/src/lib/abstracts/automapper-profile.abstract.ts b/packages/nestjs/src/lib/abstracts/automapper-profile.abstract.ts index c22e403e6..1bffd2499 100644 --- a/packages/nestjs/src/lib/abstracts/automapper-profile.abstract.ts +++ b/packages/nestjs/src/lib/abstracts/automapper-profile.abstract.ts @@ -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;