From 993fab9ea4e24061a3f50f08d7b29453408c264b Mon Sep 17 00:00:00 2001 From: nikogu <644506165@qq.com> Date: Wed, 1 Nov 2017 17:06:12 +0800 Subject: [PATCH] fix dump resize function in Pie --- src/components/Charts/Pie/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index 658e7939..8a0f3023 100644 --- a/src/components/Charts/Pie/index.js +++ b/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 -- GitLab