Просмотр исходного кода

fix dump resize function in Pie

nikogu 8 лет назад
Родитель
Сommit
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)
   resize = () => {
     const { hasLegend } = this.props;
-    if (!hasLegend || !this.node) {
+    if (!hasLegend || !this.root) {
+      window.removeEventListener('resize', this.resize);
       return;
     }
     // antd xs size