Permalink
Browse files

Add existence test to var export

  • Loading branch information...
onewland committed Apr 11, 2012
1 parent 1e54863 commit d9de4d9c360dd1a20d2dc50c0540b36d95921f79
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bb/var.rb
View
@@ -271,7 +271,7 @@ def gen_xml_exporter(xml)
"if @has('#{name}') && @#{name} != #{default} " +
"then xml.setAttribute('#{xn}', @get('#{name}'))"
else
- "#{xml}.setAttribute('#{xn}', @get('#{name}'))"
+ "#{xml}.setAttribute('#{xn}', @get('#{name}')) if @has('#{name}')"
end
when XML_STORAGE_SUBELEMENT

0 comments on commit d9de4d9

Please sign in to comment.