Skip to content

Commit afb231e

Browse files
committed
fix(compiler-core): skip empty expressions when validating expressions in browser mode
1 parent 5715bcc commit afb231e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/compiler-core/src/validateExpression.ts

+7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ export function validateBrowserExpression(
3232
asRawStatements = false
3333
) {
3434
const exp = node.content
35+
36+
// empty expressions are validated per-directive since some directives
37+
// do allow empty expressions.
38+
if (!exp.trim()) {
39+
return
40+
}
41+
3542
try {
3643
new Function(
3744
asRawStatements

0 commit comments

Comments
 (0)