Improved error handling of of invalid setting attributes.

This commit is contained in:
Martin Edenhofer 2018-05-22 08:14:13 +02:00
parent ebebfef8b1
commit ff11f7f3d3

View file

@ -9,6 +9,13 @@ class App.SettingsAreaItem extends App.Controller
render: => render: =>
# input validation for error handling
if !@setting.options
throw "No such options for #{@setting.name}"
if !@setting.options.form
throw "No such options.form for #{@setting.name}"
# defaults # defaults
directValue = 0 directValue = 0
for item in @setting.options['form'] for item in @setting.options['form']