lib/faml/attribute_optimizer.rb in faml-0.6.1 vs lib/faml/attribute_optimizer.rb in faml-0.6.2
- old
+ new
@@ -9,9 +9,13 @@
parser = StaticHashParser.new
unless parser.parse("{#{new_attributes}#{old_attributes}}")
assert_valid_ruby_code!(old_attributes)
return [nil, nil]
end
+ if old_attributes && new_attributes
+ # TODO: Quit optimization. Merge id and class correctly.
+ return [nil, nil]
+ end
static_attributes, dynamic_attributes = build_optimized_attributes(parser, static_id, static_class)
if optimizable?(old_attributes, new_attributes, static_attributes, dynamic_attributes)
[static_attributes, dynamic_attributes]
else