mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
fix regexp compare (#783)
* fix regexp compare * npm run doc * docs: fix Co-authored-by: Mohammed Sohail <sohailsameja@gmail.com>
This commit is contained in:
parent
b4309cf45a
commit
d853a18079
@ -1609,7 +1609,7 @@ class TelegramBot extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
removeTextListener(regexp) {
|
removeTextListener(regexp) {
|
||||||
const index = this._textRegexpCallbacks.findIndex((textListener) => {
|
const index = this._textRegexpCallbacks.findIndex((textListener) => {
|
||||||
return textListener.regexp === regexp;
|
return String(textListener.regexp) === String(regexp);
|
||||||
});
|
});
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user