diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js index 8adf506a..927b1331 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js @@ -27,11 +27,8 @@ const formatResponse = (data, mode, filter) => { let isValidJSON = false; try { - if (typeof data === 'string') { - isValidJSON = true; - } else { - isValidJSON = typeof JSON.parse(JSON.stringify(data)) === 'object'; - } + isValidJSON = + typeof JSON.parse(JSON.stringify(data)) === 'object' || typeof JSON.parse(JSON.stringify(data)) === 'string'; } catch (error) { console.log('Error parsing JSON: ', error.message); }