Skip to content

Commit

Permalink
fix(compiler-core): skip empty expressions when validating expression…
Browse files Browse the repository at this point in the history
…s in browser mode
  • Loading branch information
yyx990803 committed Jun 15, 2020
1 parent 5715bcc commit afb231e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/compiler-core/src/validateExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit afb231e

Please sign in to comment.