Skip to content

Commit

Permalink
Remove unnecessary code from setValueForStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
hosseinmd authored and necolas committed Sep 11, 2020
1 parent 7ab0498 commit 4a70300
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/

import dangerousStyleValue from '../dangerousStyleValue';
import hyphenateStyleName from 'hyphenate-style-name';

/**
* Sets the value for multiple styles on a node. If a value is specified as
Expand All @@ -32,8 +31,7 @@ function setValueForStyles(node, styles) {
styleName = 'cssFloat';
}
if (isCustomProperty) {
const name = isCustomProperty ? styleName : hyphenateStyleName(styleName);
style.setProperty(name, styleValue);
style.setProperty(styleName, styleValue);
} else {
style[styleName] = styleValue;
}
Expand Down

0 comments on commit 4a70300

Please sign in to comment.