diff --git a/src/ts-ast-util/tag-utils.ts b/src/ts-ast-util/tag-utils.ts index 573f9247..335ed3c9 100644 --- a/src/ts-ast-util/tag-utils.ts +++ b/src/ts-ast-util/tag-utils.ts @@ -57,7 +57,12 @@ export function getTemplateNodeUnder( return node.template; } } - if (allowFunctionCallExpression && ts.isCallExpression(node) && ts.isIdentifier(node.expression)) { + if ( + allowFunctionCallExpression && + ts.isCallExpression(node) && + ts.isIdentifier(node.expression) && + node.arguments.length > 0 + ) { const firstArg = node.arguments[0]; if (!ts.isTemplateLiteral(firstArg)) return; if (names.includes(node.expression.escapedText as string)) {