From a8c474588cdaabaab56995e5497d8ce340f000b7 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Sun, 23 Jun 2024 16:31:49 -0300 Subject: [PATCH] Removed markdown to not cause problems --- .../components/chatView/chatMessage/index.tsx | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx index 2b583dd63..39c77ff61 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx @@ -186,7 +186,7 @@ export default function ChatMessage({ /> ) : ( { - if ((children as string)!.length) { - if (children![0] === "▍") { - return ( - - ▍ - - ); + if(typeof children === "string"){ + if ((children as string)!.length) { + if (children![0] === "▍") { + return ( + + ▍ + + ); + } + children![0] = ( + children![0] as string + ).replace("`▍`", "▍"); } - - children![0] = ( - children![0] as string - ).replace("`▍`", "▍"); } const match = /language-(\w+)/.exec(