From 29a6bb35eaec80a52b64cd0ef061f7684718348a Mon Sep 17 00:00:00 2001 From: Shubhendu Madhukar Date: Sat, 5 Aug 2023 07:59:35 +0530 Subject: [PATCH] fix: linting error --- src/routes/GlobalController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/GlobalController.ts b/src/routes/GlobalController.ts index 436262c..6946b4f 100644 --- a/src/routes/GlobalController.ts +++ b/src/routes/GlobalController.ts @@ -42,7 +42,8 @@ export default class GlobalController { const response = await parser.getResponse(mockFile); try { const fileBody = JSON.parse(response.body) - if (fileBody.hasOwnProperty("camouflage_file_helper")) { + const hasKey = Object.prototype.hasOwnProperty.call(fileBody, 'camouflage_file_helper'); + if (hasKey) { res.sendFile(fileBody["camouflage_file_helper"]) return }