Skip to content

Commit d853a18

Browse files
German Smirnovkamikazechaser
andauthored
fix regexp compare (#783)
* fix regexp compare * npm run doc * docs: fix Co-authored-by: Mohammed Sohail <[email protected]>
1 parent b4309cf commit d853a18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/telegram.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ class TelegramBot extends EventEmitter {
16091609
*/
16101610
removeTextListener(regexp) {
16111611
const index = this._textRegexpCallbacks.findIndex((textListener) => {
1612-
return textListener.regexp === regexp;
1612+
return String(textListener.regexp) === String(regexp);
16131613
});
16141614
if (index === -1) {
16151615
return null;

0 commit comments

Comments
 (0)