Skip to content

Commit

Permalink
fix 500 thrown for empty logo/favicon/background
Browse files Browse the repository at this point in the history
  • Loading branch information
dularion committed Apr 3, 2019
1 parent dd4c90f commit 0d322bc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions grails-app/taglib/streama/AssetSettingTagLib.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class AssetSettingTagLib {
def linkRelIconSetting = { attribs ->
def setting = attribs['setting']

if(!setting){
return
}

out << '<link rel="icon" href="'+getAssetFromSetting(setting)+'" type="image/x-icon">'
}

Expand All @@ -27,13 +31,20 @@ class AssetSettingTagLib {
def altText = ""
if(alt) altText = 'alt="'+alt+'"'

if(!setting){
return
}
out << '<img class="'+classNames+'" src="'+getAssetFromSetting(setting)+'" '+altText+'>'
}

def cssBackgroundSetting = { attribs ->
def setting = attribs['setting']
def selector = attribs['selector']

if(!setting){
return
}

out << '<style>'
out << selector
out << '{ background-image: url('
Expand Down

0 comments on commit 0d322bc

Please sign in to comment.