Improved error handling.

This commit is contained in:
Martin Edenhofer 2016-03-24 16:22:23 +01:00
parent 698f69d1b0
commit ed89aa5da8

View file

@ -251,15 +251,15 @@ class _taskManagerSingleton extends App.Controller
return false if !controller
# set controller state to active
if controller.active
if controller.active && _.isFunction(controller.active)
controller.active(true)
# execute controllers show
if controller.show
if controller.show && _.isFunction(controller.show)
controller.show(params_app)
# update title
if controller.meta
if controller.meta && _.isFunction(controller.meta)
meta = controller.meta()
@title meta.title
@ -273,11 +273,11 @@ class _taskManagerSingleton extends App.Controller
return false if !controller
# set controller state to active
if controller.active
if controller.active && _.isFunction(controller.active)
controller.active(false)
# execute controllers hide
if controller.hide
if controller.hide && _.isFunction(controller.hide)
controller.hide()
true