lib/teacup-ios/style.rb in teacup-2.3.0 vs lib/teacup-ios/style.rb in teacup-3.0.0
- old
+ new
@@ -94,10 +94,14 @@
properties.delete(:extends)
# if we know the class of the target, we can apply styles via class
# inheritance.
if target_class
- target_class.class.ancestors.each do |ancestor|
+ unless target_class.is_a?(Class)
+ target_class = target_class.class
+ end
+
+ target_class.ancestors.each do |ancestor|
extended_properties = stylesheet.query(ancestor, nil, rotation_orientation)
Teacup::merge_defaults!(properties, extended_properties)
end
end
end