From 30c888c162933c1fe805c560e16f09fda713833f Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Mon, 19 Aug 2019 16:17:12 +0300 Subject: [PATCH] Bug Fixed: Shadowed name --- src/class-wrapper.service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/class-wrapper.service.ts b/src/class-wrapper.service.ts index 9dcd4de..0244f29 100644 --- a/src/class-wrapper.service.ts +++ b/src/class-wrapper.service.ts @@ -56,9 +56,9 @@ export class ClassWrapperService { } try { - const res = fn.apply(this, args) - if (classWrapper.isPromise(res)) { - res + const fnRes = fn.apply(this, args) + if (classWrapper.isPromise(fnRes)) { + fnRes .then((result: any) => { logEnd(result) return result @@ -67,10 +67,10 @@ export class ClassWrapperService { logEnd(error, true) throw error }) - return res + return fnRes } - logEnd(res) - return res + logEnd(fnRes) + return fnRes } catch (error) { logEnd(error, true) throw error