Commit f0ae5b14 by heheer Committed by GitHub

echarts crush catch (#5156)

parent 40bc05d0
...@@ -56,8 +56,12 @@ const EChartsCodeBlock = ({ code }: { code: string }) => { ...@@ -56,8 +56,12 @@ const EChartsCodeBlock = ({ code }: { code: string }) => {
if (!option) return; if (!option) return;
if (chartRef.current) { if (chartRef.current) {
try {
eChart.current = echarts.init(chartRef.current); eChart.current = echarts.init(chartRef.current);
eChart.current.setOption(option); eChart.current.setOption(option);
} catch (error) {
console.error('ECharts render failed:', error);
}
} }
findMarkdownDom(); findMarkdownDom();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment