From b9911376289bec4d3cd82049391bbed65e575e4d Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 6 Jun 2017 20:38:23 +0800 Subject: [PATCH] fix spin timer, close #6383 --- components/spin/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/spin/index.tsx b/components/spin/index.tsx index 6ab46ac12c..d8a6a74a5f 100644 --- a/components/spin/index.tsx +++ b/components/spin/index.tsx @@ -78,6 +78,9 @@ export default class Spin extends React.Component { } } else { if (spinning && delay && !isNaN(Number(delay))) { + if (this.delayTimeout) { + clearTimeout(this.delayTimeout); + } this.delayTimeout = setTimeout(() => this.setState({ spinning }), delay); } else { this.setState({ spinning });