From 49f4d5ec239f36d75d680bdc9eeaa3056a91865a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Mon, 4 Nov 2019 14:08:16 -0300 Subject: [PATCH] Process string, when is not base64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/utils/fun.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/fun.js b/lib/utils/fun.js index 573eda8..35eabed 100644 --- a/lib/utils/fun.js +++ b/lib/utils/fun.js @@ -56,7 +56,7 @@ const asData = (data, contentType) => { let result = data; // pattern matching alike - result = isString(result) && isJsonContentType(contentType) + result = isString(result) && !isBase64(result) && isJsonContentType(contentType) ? JSON.parse(result) : result;