Procházet zdrojové kódy

fix dump resize function in Pie

nikogu před 8 roky
rodič
revize
993fab9ea4
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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