File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
packages/babel-plugin-jsx/src Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const getJSXAttributeValue = (
36
36
return transformJSXElement ( valuePath , state ) ;
37
37
}
38
38
if ( valuePath . isStringLiteral ( ) ) {
39
- return valuePath . node ;
39
+ return transformJSXText ( valuePath ) ;
40
40
}
41
41
if ( valuePath . isJSXExpressionContainer ( ) ) {
42
42
return transformJSXExpressionContainer ( valuePath ) ;
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export const getJSXAttributeName = (path: NodePath<t.JSXAttribute>): string => {
138
138
* @returns StringLiteral | null
139
139
*/
140
140
export const transformJSXText = (
141
- path : NodePath < t . JSXText >
141
+ path : NodePath < t . JSXText | t . StringLiteral >
142
142
) : t . StringLiteral | null => {
143
143
const { node } = path ;
144
144
const lines = node . value . split ( / \r \n | \n | \r / ) ;
You can’t perform that action at this time.
0 commit comments