Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit b0968af

Browse files
committed
Make React::HASH_ATTRIBUTES back
1 parent cc46cf5 commit b0968af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/react/api.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ def self.convert_props(properties)
134134
props["className"] = value
135135
elsif ["style", "dangerously_set_inner_HTML"].include? key
136136
props[lower_camelize(key)] = value.to_n
137+
elsif React::HASH_ATTRIBUTES.include?(key) && value.is_a?(Hash)
138+
value.each { |k, v| props["#{key}-#{k.tr('_', '-')}"] = v.to_n }
137139
else
138140
props[React.html_attr?(lower_camelize(key)) ? lower_camelize(key) : key] = value
139141
end

0 commit comments

Comments
 (0)