From a87d0f9ac45c41971bab7d8cd6be7b42468b4e7c Mon Sep 17 00:00:00 2001 From: Martin <901824+martinstark@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:55:22 +0200 Subject: [PATCH] chore: improve logic for logging request responses --- src/api/handle-fetch-request.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/handle-fetch-request.ts b/src/api/handle-fetch-request.ts index 986d830b..a9df575a 100644 --- a/src/api/handle-fetch-request.ts +++ b/src/api/handle-fetch-request.ts @@ -31,7 +31,9 @@ export const handleFetchRequest = async ( ); } - console.log("Request response:", text || json); + if (text || json) { + console.log("Request response:", text || json); + } return text || json; };