Skip to content

Commit ba2c2f6

Browse files
author
Max Stoiber
committed
Fix the CSS prop generating invalid CSS
1 parent 1af8352 commit ba2c2f6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/visitors/transpileCssProp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export default t => (path, state) => {
6060
} else {
6161
css = t.templateLiteral(
6262
[
63-
t.templateElement({ raw: '' }, false),
64-
t.templateElement({ raw: '' }, true),
63+
t.templateElement({ raw: '', cooked: '' }, false),
64+
t.templateElement({ raw: '', cooked: '' }, true),
6565
],
6666
[path.node.value.expression]
6767
)

test/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function _templateObject11() {
439439
}
440440
441441
function _templateObject10() {
442-
var data = _taggedTemplateLiteral([void 0, void 0], [\\"\\", \\"\\"]);
442+
var data = _taggedTemplateLiteral([\\"\\", \\"\\"]);
443443
444444
_templateObject10 = function _templateObject10() {
445445
return data;
@@ -479,7 +479,7 @@ function _templateObject7() {
479479
}
480480
481481
function _templateObject6() {
482-
var data = _taggedTemplateLiteral([void 0, void 0], [\\"\\", \\"\\"]);
482+
var data = _taggedTemplateLiteral([\\"\\", \\"\\"]);
483483
484484
_templateObject6 = function _templateObject6() {
485485
return data;

0 commit comments

Comments
 (0)