Skip to content

Commit ea44085

Browse files
committed
🧱 fix: delete normal Errorboundary
1 parent 1b14b65 commit ea44085

1 file changed

Lines changed: 8 additions & 22 deletions

File tree

src/Markdown/index.tsx

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Collapse, Divider, Image, Typography } from 'antd';
22
import { CSSProperties, memo } from 'react';
3-
import { ErrorBoundary } from 'react-error-boundary';
43
import ReactMarkdown from 'react-markdown';
54
import rehypeKatex from 'rehype-katex';
65
import remarkGfm from 'remark-gfm';
@@ -45,28 +44,15 @@ const Markdown = memo<MarkdownProps>(
4544

4645
return (
4746
<Typography className={className} onDoubleClick={onDoubleClick} style={style}>
48-
<ErrorBoundary
49-
fallback={
50-
<ReactMarkdown
51-
className={styles.markdown}
52-
components={components}
53-
remarkPlugins={[remarkGfm]}
54-
{...rest}
55-
>
56-
{children}
57-
</ReactMarkdown>
58-
}
47+
<ReactMarkdown
48+
className={styles.markdown}
49+
components={components}
50+
rehypePlugins={[rehypeKatex]}
51+
remarkPlugins={[remarkGfm, remarkMath]}
52+
{...rest}
5953
>
60-
<ReactMarkdown
61-
className={styles.markdown}
62-
components={components}
63-
rehypePlugins={[rehypeKatex]}
64-
remarkPlugins={[remarkGfm, remarkMath]}
65-
{...rest}
66-
>
67-
{children}
68-
</ReactMarkdown>
69-
</ErrorBoundary>
54+
{children}
55+
</ReactMarkdown>
7056
</Typography>
7157
);
7258
},

0 commit comments

Comments
 (0)