From ef6ac559ec9ed7bd0e5f82dc1ab1eb61b955ca74 Mon Sep 17 00:00:00 2001
From: Sorunome <mail@sorunome.de>
Date: Thu, 16 May 2019 19:59:43 +0200
Subject: [PATCH] check lock.i against null specifically

---
 src/bot.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bot.ts b/src/bot.ts
index 1ecd02f..ab5abff 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -157,7 +157,7 @@ export class DiscordBot {
 
     public unlockChannel(channel: Discord.Channel) {
         const lock = this.channelLocks[channel.id];
-        if (lock && lock.i) {
+        if (lock && lock.i !== null) {
             clearTimeout(lock.i);
         }
         delete this.channelLocks[channel.id];
-- 
GitLab