Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Sep 8, 2024
1 parent 0bdb2fd commit 3b09527
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/components/elements/ApiActionResponse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export default function ApiActionResponse(props: Props) {
const [previousResponse, setPreviousResponse] = useLocalStorage('previousResponse' + requestUri + method, '');
const [isHtml, setIsHtml] = useState(false);
useEffect(() => {
if (JSON.parse(responseHeaders)['content-type'].split(';')[0] === 'text/html') {

if (responseHeaders && JSON.parse(responseHeaders)['content-type'].split(';')[0] === 'text/html') {
setIsHtml(true)
}

Expand Down

0 comments on commit 3b09527

Please sign in to comment.