From 8a58f02061458f975425829c1355c345907cf192 Mon Sep 17 00:00:00 2001 From: Chau Tran Date: Tue, 5 Nov 2019 23:59:54 -0600 Subject: [PATCH] fix(automapper.provider.ts): trigger build --- src/automapper.provider.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/automapper.provider.ts b/src/automapper.provider.ts index e0daa3f..78e1d21 100644 --- a/src/automapper.provider.ts +++ b/src/automapper.provider.ts @@ -30,17 +30,17 @@ export const forFeatureProviders = ( options: AutomapperModuleFeatureOptions ): Provider[] => { const token = getMapperToken(options ? options.name : ''); - const mapper = MapperMap.has(token) + const _mapper = MapperMap.has(token) ? (MapperMap.get(token) as AutoMapper) : new AutoMapper(); - options.profiles.forEach(mapper.addProfile.bind(mapper)); - !MapperMap.has(token) && MapperMap.set(token, mapper); + options.profiles.forEach(_mapper.addProfile.bind(_mapper)); + !MapperMap.has(token) && MapperMap.set(token, _mapper); return [ { provide: token, - useValue: mapper, + useValue: _mapper, }, ]; };