Skip to content

Commit

Permalink
fix(compiler-sfc): Resolve object expression parsing errors in v-on (
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz authored Oct 23, 2023
1 parent d27c128 commit b8c8b3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ function processExp(exp: string, isTS: boolean, 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 b8c8b3f

Please sign in to comment.