Skip to content

Commit

Permalink
fix: empty style tag no longer throws error
Browse files Browse the repository at this point in the history
if `<p style="" />` were to be parsed this invalid `style` prop would reach React and an error would be thrown, stopping rehydration
  • Loading branch information
willtonkin committed Dec 10, 2018
1 parent 200aeaf commit 74e5da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dom-element-to-react/src/staticToReactElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default async (el: Element, recursor: StaticToReactElementRecursor) => {
{}
);

if (attributes.style) {
if ("style" in attributes) {
attributes = bootstrapStyles(attributes);
}

Expand Down

0 comments on commit 74e5da7

Please sign in to comment.