From 26c92a1ec2889bf28a4cb4affeb56ab1f34255f2 Mon Sep 17 00:00:00 2001 From: RaoHai Date: Wed, 11 May 2016 20:49:18 +0800 Subject: [PATCH] clearTimeout while umounting `Spin` Component close #1658 --- components/spin/index.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/spin/index.jsx b/components/spin/index.jsx index faa51fa3cd..5fdade4e39 100644 --- a/components/spin/index.jsx +++ b/components/spin/index.jsx @@ -34,6 +34,12 @@ export default class Spin extends React.Component { } } + componentWillUnmount() { + if (this.debounceTimeout) { + clearTimeout(this.debounceTimeout); + } + } + getSpinning(props) { // Backwards support if ('spining' in props) {