Skip to content

Commit

Permalink
Provide default args to image_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nbelzer committed Sep 5, 2024
1 parent 3da15d1 commit 95894e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/minitest-shopify/filters/image_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def image_url(input, width = nil, height = nil)
input
end

def image_tag(input, args)
def image_tag(input, args = [])
attributes = args.map { |k, v| "#{k}=\"#{v}\"" }.join(" ")
"<img src=\"#{input}\" #{attributes} />"
end
Expand Down

0 comments on commit 95894e2

Please sign in to comment.