diff --git a/telegrambot/99-telegrambot.js b/telegrambot/99-telegrambot.js index 3505dce..3646c53 100644 --- a/telegrambot/99-telegrambot.js +++ b/telegrambot/99-telegrambot.js @@ -603,13 +603,13 @@ module.exports = function (RED) { this.isCommandRegistered = function (command) { let found = false; - for (var key in self.commandsByNode){ - if (self.commandsByNode[key].command === command){ + for (let key in self.commandsByNode) { + if (self.commandsByNode[key].command === command) { found = true; break; } } - + return found; };