Parcourir la source

fix dump resize function in Pie

nikogu il y a 8 ans
Parent
commit
993fab9ea4
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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