From fc57d8f7262842669d03ee714dc37010999892e7 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 18 Nov 2017 21:42:26 +0800 Subject: [PATCH] Fix cancel undefined --- src/components/Charts/TagCloud/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Charts/TagCloud/index.js b/src/components/Charts/TagCloud/index.js index 78271484..d3f0d70c 100644 --- a/src/components/Charts/TagCloud/index.js +++ b/src/components/Charts/TagCloud/index.js @@ -27,7 +27,7 @@ class TagCloud extends PureComponent { componentWillUnmount() { window.removeEventListener('resize', this.resize); - this.resize.cancel(); + this.renderChart.cancel(); } resize = () => { @@ -77,7 +77,7 @@ class TagCloud extends PureComponent { @Bind() @Debounce(500) - renderChart = (newData) => { + renderChart(newData) { const data = newData || this.props.data; if (!data || data.length < 1) { return; -- GitLab