From d853a180793c36105c52d5cce6fe6a6b9f055d5d Mon Sep 17 00:00:00 2001 From: German Smirnov Date: Tue, 12 May 2020 07:20:52 +0300 Subject: [PATCH] fix regexp compare (#783) * fix regexp compare * npm run doc * docs: fix Co-authored-by: Mohammed Sohail --- src/telegram.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telegram.js b/src/telegram.js index 7e353c2..9c5bba4 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -1609,7 +1609,7 @@ class TelegramBot extends EventEmitter { */ removeTextListener(regexp) { const index = this._textRegexpCallbacks.findIndex((textListener) => { - return textListener.regexp === regexp; + return String(textListener.regexp) === String(regexp); }); if (index === -1) { return null;