Skip to content

Commit c48a299

Browse files
mchudyExilz
authored andcommitted
Fix converting of the fontWeight property
1 parent 396ef6d commit c48a299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HTMLStyles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function cssToRNStyle (css, styleset, { parentTag, emSize, ptSize, ignoredStyles
144144
}
145145
// See if we can convert a 20px to a 20 automagically
146146
const numericValue = parseFloat(value.replace('px', ''));
147-
if (!isNaN(numericValue)) {
147+
if (key !== 'fontWeight' && !isNaN(numericValue)) {
148148
testStyle[key] = numericValue;
149149
if (checkPropTypes(styleProp, testStyle, key, 'react-native-render-html') == null) {
150150
return [key, numericValue];

0 commit comments

Comments
 (0)