From 84a0a82cf47730f831cbb803816a5ce99a22fd58 Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 27 Jan 2025 01:51:09 +0000 Subject: [PATCH] fix tr-pull-ot cli --- src/oneTrust/helpers/oneTrustAssessmentToJson.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oneTrust/helpers/oneTrustAssessmentToJson.ts b/src/oneTrust/helpers/oneTrustAssessmentToJson.ts index b90200fd..8c4c9e3b 100644 --- a/src/oneTrust/helpers/oneTrustAssessmentToJson.ts +++ b/src/oneTrust/helpers/oneTrustAssessmentToJson.ts @@ -27,10 +27,10 @@ export const oneTrustAssessmentToJson = ({ jsonEntry = '[\n'; } - const stringifiedAssessment = JSON.stringify(assessment, null, 2); + const stringifiedAssessment = JSON.stringify(assessment); // Add comma for all items except the last one - const comma = index < total - 1 ? ',' : ''; + const comma = index < total - 1 && !wrap ? ',' : ''; // write to file jsonEntry = jsonEntry + stringifiedAssessment + comma;