diff --git a/packages/botkit/src/core.ts b/packages/botkit/src/core.ts index d9950f21d..3a61ca7d5 100644 --- a/packages/botkit/src/core.ts +++ b/packages/botkit/src/core.ts @@ -1090,7 +1090,7 @@ export class Botkit { } let worker: BotWorker = null; - const adapter = custom_adapter || (config.context && config.context.adapter) ? config.context.adapter : this.adapter; + const adapter = custom_adapter || (config && config.context && config.context.adapter) ? config.context.adapter : this.adapter; if (adapter.botkit_worker) { const CustomBotWorker = adapter.botkit_worker;