diff --git a/src/components/Charts/Radar/index.js b/src/components/Charts/Radar/index.js index 8489ff0ca5c61fc8aff7b7a3e8d540a20a34e31a..64c51a65b3728d67fae584b75f7f64615bad5722 100644 --- a/src/components/Charts/Radar/index.js +++ b/src/components/Charts/Radar/index.js @@ -31,6 +31,7 @@ export default class Radar extends Component { getLegendData = () => { if (!this.chart) return; const geom = this.chart.getAllGeoms()[0]; // 获取所有的图形 + if (!geom) return; const items = geom.get('dataArray') || []; // 获取图形对应的 const legendData = items.map(item => {