diff --git a/packages/unminify/src/transformations/un-jsx.ts b/packages/unminify/src/transformations/un-jsx.ts index b8b292db..54e2cdc5 100644 --- a/packages/unminify/src/transformations/un-jsx.ts +++ b/packages/unminify/src/transformations/un-jsx.ts @@ -165,6 +165,7 @@ function toJSX(j: JSCodeshift, path: ASTPath, pragmas: string[], if (isVariableDeclarationArray.length) { isVariableDeclarationArray.forEach((path: any) => { removeDeclarationIfUnused(j, path, path.node.id.name) + // this will pick value against index tag = { ...tag, name: path.node.init.elements[variableDeclaration.declarations[0].init.property.value].value } }) }