From fb8277f03ee1ac87aa37b332aa25cd422c5bd0ee Mon Sep 17 00:00:00 2001 From: Adarsh Lilha Date: Sat, 25 Nov 2023 14:19:41 +0530 Subject: [PATCH] fix falsy check of response --- .../bruno-app/src/components/ResponsePane/QueryResult/index.js | 2 +- packages/bruno-app/src/utils/common/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js index a8f13505c..49f592aeb 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js @@ -11,7 +11,7 @@ import { useEffect } from 'react'; import { useTheme } from 'providers/Theme/index'; const formatResponse = (data, mode) => { - if (!data) { + if (data === undefined) { return ''; } diff --git a/packages/bruno-app/src/utils/common/index.js b/packages/bruno-app/src/utils/common/index.js index be6982436..0df2de529 100644 --- a/packages/bruno-app/src/utils/common/index.js +++ b/packages/bruno-app/src/utils/common/index.js @@ -38,7 +38,7 @@ export const safeParseJSON = (str) => { }; export const safeStringifyJSON = (obj, indent = false) => { - if (!obj) { + if (obj === undefined) { return obj; } try {