Skip to content

Commit 74e5da7

Browse files
committed
fix: empty style tag no longer throws error
if `<p style="" />` were to be parsed this invalid `style` prop would reach React and an error would be thrown, stopping rehydration
1 parent 200aeaf commit 74e5da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dom-element-to-react/src/staticToReactElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default async (el: Element, recursor: StaticToReactElementRecursor) => {
5151
{}
5252
);
5353

54-
if (attributes.style) {
54+
if ("style" in attributes) {
5555
attributes = bootstrapStyles(attributes);
5656
}
5757

0 commit comments

Comments
 (0)