Commit 116a7f08 authored by 杨思琦's avatar 杨思琦

fix: 判断ref

parent 6cfe185e
......@@ -16,7 +16,7 @@ const ECharts = memo(
}, [props.option]);
// const chartProps = pick(props, ['option', 'notMerge', 'lazyUpdate', 'style', 'className', 'theme', 'onChartReady', 'loadingOption', 'showLoading', 'onEvents', 'opts']);
if (ref.current) {
if (ref && ref.current) {
ref.current.getEchartsInstance().clear();
ref.current.getEchartsInstance().setOption(option);
ref.current.getEchartsInstance().resize();
......
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 to comment