From 3f4ea581f0a3af2726eafc88996a5f85a260038f Mon Sep 17 00:00:00 2001 From: caserKing Date: Mon, 12 Aug 2019 17:57:29 +0800 Subject: [PATCH] =?UTF-8?q?timer=E5=8F=A6=E8=B5=B7=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/App.js b/App.js index c7f850e..990c6a3 100644 --- a/App.js +++ b/App.js @@ -56,7 +56,7 @@ var animationThemes = [ } ] -var timer = null; +var curTimer = null; var hbRequestCount var getAdDataCount @@ -358,8 +358,8 @@ codePushStatusDidChange(syncStatus) { } componentWillUnmount(){ - if (timer) - clearTimeout(timer) + if (curTimer) + clearTimeout(curTimer) } @@ -414,7 +414,7 @@ async routine() { this.setState({ versionInfo: versionInfo+'[E]'}); } - timer = setTimeout(()=>{ + curTimer = setTimeout(()=>{ this.routine(); },1000); }