diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/util/serialized_attributes.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/axlsx/util/serialized_attributes.rb b/lib/axlsx/util/serialized_attributes.rb index 76ec7e41..d38afe78 100644 --- a/lib/axlsx/util/serialized_attributes.rb +++ b/lib/axlsx/util/serialized_attributes.rb @@ -48,11 +48,9 @@ module Axlsx end def declared_attributes - declared = instance_values - declared.each do |key, value| - declared.delete(key) if value == nil || !self.class.xml_attributes.include?(key.to_sym) + instance_values.select do |key, value| + value != nil && self.class.xml_attributes.include?(key.to_sym) end - declared end # serialized instance values at text nodes on a camelized element of the |
