Skip to content

Commit

Permalink
fix(compiler-core): improve reg for v-on function expression
Browse files Browse the repository at this point in the history
  • Loading branch information
hchlq committed May 1, 2022
1 parent 5ea150a commit 234fe86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler-core/src/transforms/vOn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { hasScopeRef, isMemberExpression } from '../utils'
import { TO_HANDLER_KEY } from '../runtimeHelpers'

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

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

0 comments on commit 234fe86

Please sign in to comment.