fix(compiler-core): fix scope var reference check for v-on expressions
fix #2564
This commit is contained in:
@@ -79,7 +79,12 @@ export const transformOn: DirectiveTransform = (
|
||||
// process the expression since it's been skipped
|
||||
if (!__BROWSER__ && context.prefixIdentifiers) {
|
||||
isInlineStatement && context.addIdentifiers(`$event`)
|
||||
exp = processExpression(exp, context, false, hasMultipleStatements)
|
||||
exp = dir.exp = processExpression(
|
||||
exp,
|
||||
context,
|
||||
false,
|
||||
hasMultipleStatements
|
||||
)
|
||||
isInlineStatement && context.removeIdentifiers(`$event`)
|
||||
// with scope analysis, the function is hoistable if it has no reference
|
||||
// to scope variables.
|
||||
|
||||
Reference in New Issue
Block a user