Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (
state.emotionSourceMap &&
styledCallPath.node.quasi.loc !== undefined
) {
sourceMap = getSourceMap(styledCallPath.node.quasi.loc.start, state)
}
styledCallPath.replaceWith(
t.callExpression(styledCallPath.node.tag, expressions)
)
}
}
if (t.isCallExpression(reference.parentPath)) {
reference.parentPath.node.arguments[1] = t.objectExpression([
t.objectProperty(
t.identifier('target'),
t.stringLiteral(getTargetClassName(state, t))
),
t.objectProperty(
t.identifier('label'),
t.stringLiteral(getLabelFromPath(reference.parentPath, t))
)
])
}
if (t.isCallExpression(reference.parentPath.parentPath)) {
if (state.emotionSourceMap) {
if (
!sourceMap &&
reference.parentPath.parentPath.node.loc !== undefined
) {
sourceMap = getSourceMap(
reference.parentPath.parentPath.node.loc.start,
state