[fix] setNativeProps

This commit is contained in:
Nicolas Gallagher
2017-04-29 18:48:52 -07:00
parent 5f69c8e8b8
commit 47fad1ef58
+3 -1
View File
@@ -77,12 +77,14 @@ const NativeMethodsMixin = {
const style = {}; const style = {};
// DOM style is a CSSStyleDeclaration // DOM style is a CSSStyleDeclaration
// https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration // https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration
for (let i = node.style.length; i > 0; i -= 1) { for (let i = 0; i < node.style.length; i += 1) {
const property = nodeStyle.item(i); const property = nodeStyle.item(i);
if (property) {
// DOM style uses hyphenated prop names and may include vendor prefixes // DOM style uses hyphenated prop names and may include vendor prefixes
// Transform back into React DOM style. // Transform back into React DOM style.
style[toCamelCase(property)] = nodeStyle.getPropertyValue(property); style[toCamelCase(property)] = nodeStyle.getPropertyValue(property);
} }
}
const domStyleProps = { classList, style }; const domStyleProps = { classList, style };
// Next DOM state // Next DOM state