From c586deeb30c854e04f850825a16c44c23669f5ad Mon Sep 17 00:00:00 2001 From: Its-treason <39559178+Its-treason@users.noreply.github.com> Date: Mon, 9 Oct 2023 17:56:48 +0200 Subject: [PATCH] fix(#382): TypeError r.replace is not a function --- .../src/components/ResponsePane/QueryResult/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js index 999eb16f..d77d0995 100644 --- a/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js +++ b/packages/bruno-app/src/components/ResponsePane/QueryResult/index.js @@ -87,7 +87,13 @@ const QueryResult = ({ item, collection, data, width, disableRunEventListener, h }; const activeResult = useMemo(() => { - if (tab === 'preview' && mode.includes('html') && item.requestSent && item.requestSent.url) { + if ( + tab === 'preview' && + mode.includes('html') && + item.requestSent && + item.requestSent.url && + typeof data === 'string' + ) { // Add the Base tag to the head so content loads properly. This also needs the correct CSP settings const webViewSrc = data.replace('', ``); return (