Browse Source

Fix cancel undefined

afc163 8 năm trước cách đây
mục cha
commit
fc57d8f726
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/components/Charts/TagCloud/index.js

+ 2 - 2
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;