Open daveisfera opened 4 years ago
Indeed! Good catch! I think >
changes the semantics of the AST so that item.props.data.length
and >
are grouped together which causes it to be left out from the transformation. This might be a bit tricky to solve.
Ya, I figured that that might be case. It definitely would be nice to clean up, but isn't a major concern right now.
Thanks once again for this saaaaweeeet codemod!
This line of code
item && item.props && item.props.data && item.props.data.length > 0
is reduced to two statementsitem?.props?.data && item.props.data.length > 0
but it could be reduced to a single statementitem?.props?.data?.length > 0