Improved error handling of of invalid setting attributes.
This commit is contained in:
parent
ebebfef8b1
commit
ff11f7f3d3
1 changed files with 7 additions and 0 deletions
|
@ -9,6 +9,13 @@ class App.SettingsAreaItem extends App.Controller
|
|||
|
||||
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
|
||||
directValue = 0
|
||||
for item in @setting.options['form']
|
||||
|
|
Loading…
Reference in a new issue