From: Carl Worth Date: Thu, 18 Jun 2020 15:15:39 +0000 (-0700) Subject: Reset timer handle after clearTimeout X-Git-Url: https://git.cworth.org/git?p=lmno-server;a=commitdiff_plain;h=4b5792d269a7df065ac9b05e86f28c1c21ec40ab Reset timer handle after clearTimeout 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). --- diff --git a/empathy.js b/empathy.js index 578d050..2d3028b 100644 --- a/empathy.js +++ b/empathy.js @@ -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(() => {