Skip to content

Commit 234fe86

Browse files
committed
fix(compiler-core): improve reg for v-on function expression
1 parent 5ea150a commit 234fe86

File tree

1 file changed

+1
-1
lines changed
  • packages/compiler-core/src/transforms

1 file changed

+1
-1
lines changed

packages/compiler-core/src/transforms/vOn.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { hasScopeRef, isMemberExpression } from '../utils'
1717
import { TO_HANDLER_KEY } from '../runtimeHelpers'
1818

1919
const fnExpRE =
20-
/^\s*([\w$_]+|(async\s*)?(\([^)]*?\)|[^=]+))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/
20+
/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/
2121

2222
export interface VOnDirectiveNode extends DirectiveNode {
2323
// v-on without arg is handled directly in ./transformElements.ts due to it affecting

0 commit comments

Comments
 (0)