diff options
Diffstat (limited to 'lib/axlsx/util/serialized_attributes.rb')
| -rw-r--r-- | lib/axlsx/util/serialized_attributes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/util/serialized_attributes.rb b/lib/axlsx/util/serialized_attributes.rb index dd67f75b..85a7feba 100644 --- a/lib/axlsx/util/serialized_attributes.rb +++ b/lib/axlsx/util/serialized_attributes.rb @@ -17,7 +17,7 @@ module Axlsx def serialized_attributes(str = '', additional_attributes = {}) key_value_pairs = instance_values.select do |key, value| - self.class.xml_attributes.include?(key.to_sym) + self.class.xml_attributes.include?(key.to_sym) && value != nil end key_value_pairs.merge! additional_attributes key_value_pairs.each do |key, value| |
