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()
|
url: @url()
|
||||||
id: @organization_id
|
id: @organization_id
|
||||||
|
|
||||||
|
if App.Organization.exists( @organization_id )
|
||||||
organization = App.Organization.find( @organization_id )
|
organization = App.Organization.find( @organization_id )
|
||||||
if organization
|
|
||||||
meta.head = organization.displayName()
|
meta.head = organization.displayName()
|
||||||
meta.title = organization.displayName()
|
meta.title = organization.displayName()
|
||||||
|
meta.iconClass = organization.icon()
|
||||||
|
|
||||||
meta
|
meta
|
||||||
|
|
||||||
url: =>
|
url: =>
|
||||||
|
|
|
@ -15,11 +15,12 @@ class App.UserZoom extends App.Controller
|
||||||
url: @url()
|
url: @url()
|
||||||
id: @user_id
|
id: @user_id
|
||||||
|
|
||||||
|
if App.User.exists( @user_id )
|
||||||
user = App.User.find( @user_id )
|
user = App.User.find( @user_id )
|
||||||
if user
|
|
||||||
meta.head = user.displayName()
|
meta.head = user.displayName()
|
||||||
meta.title = user.displayName()
|
meta.title = user.displayName()
|
||||||
meta.iconClass = @user.icon()
|
meta.iconClass = user.icon()
|
||||||
meta
|
meta
|
||||||
|
|
||||||
url: =>
|
url: =>
|
||||||
|
|
Loading…
Reference in a new issue