Skip to content

Commit

Permalink
Additional fix for Haufe-Lexware/wicked.haufe.io#73 - don't crash if …
Browse files Browse the repository at this point in the history
…chatbot hook URL list is not present.
  • Loading branch information
DonMartin76 committed Jul 18, 2017
1 parent 823bffd commit 39c690e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chatbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ chatbot.handleEvent = function (app, event, done) {
var text = mustache.render(messageTemplate, viewModel);

var hookUrls = app.chatbotGlobals.chatbot.hookUrls;
if (!hookUrls)
hookUrls = [];
async.each(hookUrls, function (hookUrl, callback) {
// Post to the hook URL
var payload = {
Expand Down

0 comments on commit 39c690e

Please sign in to comment.