From bbf7ad4da603936db4ef8f53d5734c5b4bb84ca9 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:18:46 +0530 Subject: [PATCH] fix: create instance of transformedObj (#2694) --- src/controllers/eventTest.ts | 2 +- src/services/eventTest/eventTester.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/eventTest.ts b/src/controllers/eventTest.ts index db6fc8cb6f..8888b63807 100644 --- a/src/controllers/eventTest.ts +++ b/src/controllers/eventTest.ts @@ -19,7 +19,7 @@ export default class EventTestController { }; ctx.status = 400; } - ctx.set('apiVersion', this.API_VERSION); + ctx.set('apiVersion', EventTestController.API_VERSION); } public static status(ctx: Context) { diff --git a/src/services/eventTest/eventTester.ts b/src/services/eventTest/eventTester.ts index d4f30fff78..a3755d3e80 100644 --- a/src/services/eventTest/eventTester.ts +++ b/src/services/eventTest/eventTester.ts @@ -11,7 +11,7 @@ export default class EventTesterService { function capitalize(s) { return s === 'id' ? s.toUpperCase() : s.charAt(0).toUpperCase() + s.slice(1); } - let transformedObj: FixMe; + const transformedObj: FixMe = {}; const { destinationDefinition } = dest; Object.keys(dest).forEach((key) => { transformedObj[capitalize(key)] = dest[key]; @@ -54,7 +54,7 @@ export default class EventTesterService { libraries, }; - let response: FixMe; + let response: FixMe = {}; let errorFound = false; if (stage.user_transform) {