Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/babel-plugin-jsx-dom-expressions/src/ssr/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ function transformAttributes(path, results, info) {
t.isObjectExpression(value.expression) &&
!value.expression.properties.some(p => t.isSpreadElement(p))
) {
if (value.expression.properties.length === 0) {
return;
}
const props = value.expression.properties.map((p, i) =>
t.callExpression(registerImportMethod(path, "ssrStyleProperty"), [
t.stringLiteral(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,5 @@ const template89 = <div style={{"background":"red", "color":"green", "border":nu
}

const template90 = <div data-hk="should warn data-hk is present on template"/>

const template91 = <div style={{}}/>
Original file line number Diff line number Diff line change
Expand Up @@ -626,4 +626,5 @@ const template89 = _tmpl$59();
});
}
const template90 = _tmpl$4();
const template91 = _tmpl$4();
_$delegateEvents(["click", "input"]);
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,8 @@ const template51 = (
/>
);

const template52 = (
<div
style={{}}
/>
);
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,4 @@ const template49 = _$ssr(_tmpl$27);
const template50 = _$ssr(_tmpl$28);
const nope = () => undefined;
const template51 = _$ssr(_tmpl$29, _$ssrStyleProperty("--bg:", _$escape(nope(), true)));
const template52 = _$ssr(_tmpl$8);
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,5 @@ const template41 = (
<option value={Color.Blue}>Blue</option>
</select>
);

const template42 = <div style={{ }} />;
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,4 @@ const template41 = _$ssr(
_$ssrAttribute("value", _$escape(Color.Red, true), false),
_$ssrAttribute("value", _$escape(Color.Blue, true), false)
);
const template42 = _$ssr(_tmpl$8, _$ssrHydrationKey());
Loading