Explorar el Código

fix dump resize function in Pie

nikogu hace 8 años
padre
commit
993fab9ea4
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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