Skip to content

Commit

Permalink
don't explode if gradient has no name
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Lahti committed Feb 3, 2024
1 parent cd7184e commit 2ebad40
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/prawn/svg/gradients.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def find_raw_element_by_id(id)
end

def gradient_element?(raw_element)
return false if raw_element.nil? || raw_element.name.nil?
Elements::TAG_CLASS_MAPPING[raw_element.name.to_sym] == Elements::Gradient
end

Expand Down

0 comments on commit 2ebad40

Please sign in to comment.