From 9466f696e3ce470975a9d0d08088fd8122e4a331 Mon Sep 17 00:00:00 2001 From: Tom Lahti Date: Sat, 3 Feb 2024 00:34:13 +0000 Subject: [PATCH] don't explode if gradient has no name --- lib/prawn/svg/gradients.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/prawn/svg/gradients.rb b/lib/prawn/svg/gradients.rb index a8fb6d1..5054460 100644 --- a/lib/prawn/svg/gradients.rb +++ b/lib/prawn/svg/gradients.rb @@ -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