1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 02:12:38 +01:00

fix another p tag issue

This commit is contained in:
Puyodead1 2023-09-23 17:11:09 -04:00
parent 9d4b82a761
commit 42acb28f20
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -128,7 +128,12 @@ const customRenderer: Partial<ReactRenderer> = {
link: (href, text) => <Link href={href}>{text}</Link>,
// prevent renderer from wrapping everything in a <p> tag
paragraph: (content: React.ReactNode[]) => {
if (content.length === 1 && Array.isArray(content[0]) && typeof content[0][0] === "string") {
if (
content.length === 1 &&
Array.isArray(content[0]) &&
content[0].length === 1 &&
typeof content[0][0] === "string"
) {
return <p>{content}</p>;
}