浏览代码

fix dump resize function in Pie

nikogu 8 年之前
父节点
当前提交
993fab9ea4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/components/Charts/Pie/index.js

+ 2 - 1
src/components/Charts/Pie/index.js

@@ -36,7 +36,8 @@ class Pie extends Component {
   @Debounce(200)
   @Debounce(200)
   resize = () => {
   resize = () => {
     const { hasLegend } = this.props;
     const { hasLegend } = this.props;
-    if (!hasLegend || !this.node) {
+    if (!hasLegend || !this.root) {
+      window.removeEventListener('resize', this.resize);
       return;
       return;
     }
     }
     // antd xs size
     // antd xs size