lib/ridley/chef_objects/environment_object.rb in ridley-2.4.1 vs lib/ridley/chef_objects/environment_object.rb in ridley-2.4.2
- old
+ new
@@ -94,10 +94,10 @@
when :default
attributes_to_change = self.default_attributes
when :override
attributes_to_change = self.override_attributes
end
- leaf_hash = dotted_path.inject(attributes_to_change) { |hash, element| hash[element] }
+ leaf_hash = dotted_path.inject(attributes_to_change) { |hash, element| hash[element] unless hash == nil }
leaf_hash.delete(leaf_key) unless leaf_hash.nil?
attributes_to_change
end
end
end