fix(compiler-core): skip empty expressions when validating expressions in browser mode

This commit is contained in:
Evan You 2020-06-15 10:59:03 -04:00
parent 5715bccb0c
commit afb231ec5c

View File

@ -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