Skip to content

Commit

Permalink
Handle blank asset name in inline svg
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Dec 26, 2023
1 parent 1fb21bc commit cca6a85
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/helpers/assets_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module AssetsHelper
include SvgHelper

def inline_svg(asset_name, classname: "svg-container")
return if asset_name.blank?
content_tag(:div, safe_svg(inline_file(asset_name)), class: classname)
end

Expand Down

0 comments on commit cca6a85

Please sign in to comment.