Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit aadcc16

Browse files
committed
fix(props): Ensure style is set correctly for both an object and a string.
#26
1 parent 2dc7273 commit aadcc16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export default function (CustomElement, opts) {
5555

5656
if (name.indexOf('on') === 0) {
5757
syncEvent(node, name.substring(2), props[name]);
58+
} else if (name === 'style') {
59+
node.setAttribute('style', props[name]);
5860
} else {
5961
node[name] = props[name];
6062
}

0 commit comments

Comments
 (0)