From 8234d21ca325c249104ef17faedccb60740fd9f1 Mon Sep 17 00:00:00 2001 From: Sean Sundberg Date: Fri, 3 Nov 2023 13:08:06 -0500 Subject: [PATCH] Handle empty spaces returned from KYC Summary (#133) Signed-off-by: Sean Sundberg --- src/services/data-extraction/data-extraction.impl.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/data-extraction/data-extraction.impl.ts b/src/services/data-extraction/data-extraction.impl.ts index c11b4f2..b87c79f 100644 --- a/src/services/data-extraction/data-extraction.impl.ts +++ b/src/services/data-extraction/data-extraction.impl.ts @@ -293,9 +293,11 @@ export class DataExtractionImpl extends DataExtractionCsv text.replace(/^Output: */, '')) .then(text => { - console.log(`KYC Summary for ${subject}: ${text}`) + const result = text.trim() - return text + console.log(`KYC Summary for ${subject}: ${result}`) + + return result }) .catch(err => { console.log('Error getting kyc summary: ', {err})