Commit fc57d8f7 authored by afc163's avatar afc163

Fix cancel undefined

parent b8a96c5b
...@@ -27,7 +27,7 @@ class TagCloud extends PureComponent { ...@@ -27,7 +27,7 @@ class TagCloud extends PureComponent {
componentWillUnmount() { componentWillUnmount() {
window.removeEventListener('resize', this.resize); window.removeEventListener('resize', this.resize);
this.resize.cancel(); this.renderChart.cancel();
} }
resize = () => { resize = () => {
...@@ -77,7 +77,7 @@ class TagCloud extends PureComponent { ...@@ -77,7 +77,7 @@ class TagCloud extends PureComponent {
@Bind() @Bind()
@Debounce(500) @Debounce(500)
renderChart = (newData) => { renderChart(newData) {
const data = newData || this.props.data; const data = newData || this.props.data;
if (!data || data.length < 1) { if (!data || data.length < 1) {
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment