Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Update core.ts
Browse files Browse the repository at this point in the history
controller.spawn() throws UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'context' of undefined . Fix for Bug#1945
  • Loading branch information
NxP4Code authored Apr 7, 2020
1 parent 77e309b commit 5507bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/botkit/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,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;
Expand Down

0 comments on commit 5507bfb

Please sign in to comment.