mirror of
https://github.com/labring/FastGPT.git
synced 2026-01-28 01:10:33 +08: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