]> git.cworth.org Git - lmno-server/commitdiff
Reset timer handle after clearTimeout
authorCarl Worth <cworth@cworth.org>
Thu, 18 Jun 2020 15:15:39 +0000 (08:15 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 26 Jun 2020 14:37:59 +0000 (07:37 -0700)
This helps make clear that the timer has been cleared, (so that we
don't accidentally call clearTimeout again in the future or anything
like that).

empathy.js

index 578d0504e15aac6bb3eb8f287d5c5aa0fc4d2aa2..2d3028be4fec5ca04eb21aee53dcf16a7eb2806d 100644 (file)
@@ -200,6 +200,7 @@ class Empathy extends Game {
 
     if (this.answering_idle_timer) {
       clearTimeout(this.answering_idle_timer);
+      this.ansering_idle_timer = 0;
     }
     if (! this.state.answering_idle) {
       this.answering_idle_timer = setTimeout(() => {