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 asRawStatements = false
) { ) {
const exp = node.content const exp = node.content
// empty expressions are validated per-directive since some directives
// do allow empty expressions.
if (!exp.trim()) {
return
}
try { try {
new Function( new Function(
asRawStatements asRawStatements