Improved error handling.
This commit is contained in:
parent
91dbba5adf
commit
d7ae9e0da3
2 changed files with 11 additions and 7 deletions
|
@ -14,10 +14,13 @@ class App.OrganizationZoom extends App.Controller
|
|||
url: @url()
|
||||
id: @organization_id
|
||||
|
||||
organization = App.Organization.find( @organization_id )
|
||||
if organization
|
||||
meta.head = organization.displayName()
|
||||
meta.title = organization.displayName()
|
||||
if App.Organization.exists( @organization_id )
|
||||
organization = App.Organization.find( @organization_id )
|
||||
|
||||
meta.head = organization.displayName()
|
||||
meta.title = organization.displayName()
|
||||
meta.iconClass = organization.icon()
|
||||
|
||||
meta
|
||||
|
||||
url: =>
|
||||
|
|
|
@ -15,11 +15,12 @@ class App.UserZoom extends App.Controller
|
|||
url: @url()
|
||||
id: @user_id
|
||||
|
||||
user = App.User.find( @user_id )
|
||||
if user
|
||||
if App.User.exists( @user_id )
|
||||
user = App.User.find( @user_id )
|
||||
|
||||
meta.head = user.displayName()
|
||||
meta.title = user.displayName()
|
||||
meta.iconClass = @user.icon()
|
||||
meta.iconClass = user.icon()
|
||||
meta
|
||||
|
||||
url: =>
|
||||
|
|
Loading…
Reference in a new issue