瀏覽代碼

fix error in workplace #1660

wangyun 7 年之前
父節點
當前提交
b918f44352
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/components/Charts/Radar/index.js

+ 1 - 0
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 => {