Преглед изворни кода

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)
   resize = () => {
     const { hasLegend } = this.props;
-    if (!hasLegend || !this.node) {
+    if (!hasLegend || !this.root) {
+      window.removeEventListener('resize', this.resize);
       return;
     }
     // antd xs size