@@ -251,14 +251,14 @@ function functionBodyPushAttributes(
251251function processJSX (
252252 context : JSXProcessingContext ,
253253 jsxNode : Babel . NodePath ,
254- componentName ?: string | null
254+ componentName ?: string
255255) : void {
256256 if ( ! jsxNode ) {
257257 return ;
258258 }
259259
260260 // Use provided componentName or fall back to context componentName
261- const currentComponentName = componentName !== undefined ? componentName : context . componentName ;
261+ const currentComponentName = componentName ?? context . componentName ;
262262
263263 // NOTE: I don't know of a case where `openingElement` would have more than one item,
264264 // but it's safer to always iterate
@@ -300,7 +300,7 @@ function processJSX(
300300 shouldSetComponentName = false ;
301301 processJSX ( context , child , currentComponentName ) ;
302302 } else {
303- processJSX ( context , child , null ) ;
303+ processJSX ( context , child , "" ) ;
304304 }
305305 } ) ;
306306}
@@ -313,7 +313,7 @@ function processJSX(
313313function applyAttributes (
314314 context : JSXProcessingContext ,
315315 openingElement : Babel . NodePath < Babel . types . JSXOpeningElement > ,
316- componentName : string | null
316+ componentName : string
317317) : void {
318318 const { t, attributeNames, ignoredComponents, fragmentContext, sourceFileName } = context ;
319319 const [ componentAttributeName , elementAttributeName , sourceFileAttributeName ] = attributeNames ;
0 commit comments