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 = (
3636 return transformJSXElement ( valuePath , state ) ;
3737 }
3838 if ( valuePath . isStringLiteral ( ) ) {
39- return valuePath . node ;
39+ return transformJSXText ( valuePath ) ;
4040 }
4141 if ( valuePath . isJSXExpressionContainer ( ) ) {
4242 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 => {
138138 * @returns StringLiteral | null
139139 */
140140export const transformJSXText = (
141- path : NodePath < t . JSXText >
141+ path : NodePath < t . JSXText | t . StringLiteral >
142142) : t . StringLiteral | null => {
143143 const { node } = path ;
144144 const lines = node . value . split ( / \r \n | \n | \r / ) ;
You can’t perform that action at this time.
0 commit comments