Skip to content

Commit

Permalink
fix(compiler-sfc): fix expression check for v-on with object literal …
Browse files Browse the repository at this point in the history
…value (vuejs#6652)

fix vuejs#6650
fix vuejs#6674
  • Loading branch information
godxiaoji authored and chrislone committed Feb 4, 2023
1 parent b5e3513 commit 0e2f6b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler-sfc/src/compileScript.ts
Expand Up @@ -2135,7 +2135,7 @@ function processExp(exp: string, dir?: string): string {
if (dir === 'slot') {
exp = `(${exp})=>{}`
} else if (dir === 'on') {
exp = `()=>{${exp}}`
exp = `()=>{return ${exp}}`
} else if (dir === 'for') {
const inMatch = exp.match(forAliasRE)
if (inMatch) {
Expand Down

0 comments on commit 0e2f6b2

Please sign in to comment.