fix the js error when not logged in and on root/landing page, app is undefined

This commit is contained in:
Florian Staudacher 2012-03-29 16:28:53 +02:00
parent 731446e078
commit 9d3f221f1a

View file

@ -21,7 +21,7 @@ module LayoutHelper
path = ENV['ASSET_HOST'].to_s + '/assets/'
content_tag(:script) do
<<-JS.html_safe
app.baseImageUrl("#{path}")
if(window.app) app.baseImageUrl("#{path}")
JS
end
end