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 <[email protected]>
  • Loading branch information
German Smirnov and kamikazechaser authored 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
Original file line number Diff line number Diff line change
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.