diff --git a/plugins/frontend/manager/src/bots.ts b/plugins/frontend/manager/src/bots.ts index 1ca1a3df76..f2342aaa0c 100644 --- a/plugins/frontend/manager/src/bots.ts +++ b/plugins/frontend/manager/src/bots.ts @@ -49,11 +49,11 @@ class BotProvider extends DataService> { ctx.on('bot-added', (bot) => { BotProvider.initialize(bot, ctx) - this.refresh() + process.nextTick(() => this.refresh()) }) ctx.on('bot-removed', (bot) => { - this.refresh() + process.nextTick(() => this.refresh()) bot._messageSent.stop() bot._messageReceived.stop() })