Haufe-Lexware / wicked.haufe.io

An API Management system based on Mashape Kong
http://wicked.haufe.io
Other
123 stars 37 forks source link

Kickstarter: removing the last chat webhook breaks the editor. #73

Closed ehirsch closed 7 years ago

ehirsch commented 7 years ago

This is a rather small issue.

When remove the last (and only) chatbot webhook url and when I save the config. I will be greeted with an error page:

TypeError: /usr/src/app/views/chatbot.jade:37
    35|                                     button(type='submit' onclick='setAction("addHook");').btn.btn-sm.btn-success Add Hook URL
    36|                     .panel-body
  > 37|                         each hookUrl, i in glob.chatbot.hookUrls
    38|                             - var thisHookName = 'glob.chatbot.hookUrls['+i+']'
    39|                             +inputField(thisHookName, glob, 'Hook URL', 'See documentation of Slack or Rocket.Chat how to get one of these.')
    40|                             p 

Cannot read property 'length' of undefined

Wicked version is 0.11.6

DonMartin76 commented 7 years ago

Fixed in 0.11.7.