mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-14 23:22:22 +00:00
echarts crush catch (#5156)
This commit is contained in:
@@ -56,8 +56,12 @@ const EChartsCodeBlock = ({ code }: { code: string }) => {
|
||||
if (!option) return;
|
||||
|
||||
if (chartRef.current) {
|
||||
eChart.current = echarts.init(chartRef.current);
|
||||
eChart.current.setOption(option);
|
||||
try {
|
||||
eChart.current = echarts.init(chartRef.current);
|
||||
eChart.current.setOption(option);
|
||||
} catch (error) {
|
||||
console.error('ECharts render failed:', error);
|
||||
}
|
||||
}
|
||||
|
||||
findMarkdownDom();
|
||||
|
Reference in New Issue
Block a user