diff --git a/app/assets/javascripts/app/controllers/organization_zoom.js.coffee b/app/assets/javascripts/app/controllers/organization_zoom.js.coffee index 027f370a7..02b88bcf4 100644 --- a/app/assets/javascripts/app/controllers/organization_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/organization_zoom.js.coffee @@ -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: => diff --git a/app/assets/javascripts/app/controllers/user_zoom.js.coffee b/app/assets/javascripts/app/controllers/user_zoom.js.coffee index b39212aea..f5269ad40 100644 --- a/app/assets/javascripts/app/controllers/user_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/user_zoom.js.coffee @@ -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: =>