Skip to content

Commit 6958ec1

Browse files
authored
fix(compiler-sfc): fix expression check for v-on with object literal value (#6652)
fix #6650 fix #6674
1 parent 6c6fe2c commit 6958ec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/compiler-sfc/src/compileScript.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,7 @@ function processExp(exp: string, dir?: string): string {
21352135
if (dir === 'slot') {
21362136
exp = `(${exp})=>{}`
21372137
} else if (dir === 'on') {
2138-
exp = `()=>{${exp}}`
2138+
exp = `()=>{return ${exp}}`
21392139
} else if (dir === 'for') {
21402140
const inMatch = exp.match(forAliasRE)
21412141
if (inMatch) {

0 commit comments

Comments
 (0)