Skip to content

Commit

Permalink
fix regexp compare (#783)
Browse files Browse the repository at this point in the history
* fix regexp compare

* npm run doc

* docs: fix

Co-authored-by: Mohammed Sohail <sohailsameja@gmail.com>
  • Loading branch information
German Smirnov and kamikazechaser committed May 12, 2020
1 parent b4309cf commit d853a18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/telegram.js
Expand Up @@ -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;
Expand Down

0 comments on commit d853a18

Please sign in to comment.