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(