fix(compiler-core): skip empty expressions when validating expressions in browser mode
This commit is contained in:
parent
5715bccb0c
commit
afb231ec5c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user