From 4b5792d269a7df065ac9b05e86f28c1c21ec40ab Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 18 Jun 2020 08:15:39 -0700 Subject: [PATCH] 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). --- empathy.js | 1 + 1 file changed, 1 insertion(+) 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(() => { -- 2.43.0