diff --git a/packages/compiler-core/src/validateExpression.ts b/packages/compiler-core/src/validateExpression.ts index 64f171fc..3ba98572 100644 --- a/packages/compiler-core/src/validateExpression.ts +++ b/packages/compiler-core/src/validateExpression.ts @@ -32,6 +32,13 @@ export function validateBrowserExpression( asRawStatements = false ) { const exp = node.content + + // empty expressions are validated per-directive since some directives + // do allow empty expressions. + if (!exp.trim()) { + return + } + try { new Function( asRawStatements