fix(compiler-core): v-on inline async function expression handler (#4569)

fix #4568
This commit is contained in:
lidlanca
2021-09-16 12:36:04 -04:00
committed by GitHub
parent 141a5e188c
commit fc968d607b
2 changed files with 54 additions and 1 deletions

View File

@@ -16,7 +16,8 @@ import { validateBrowserExpression } from '../validateExpression'
import { hasScopeRef, isMemberExpression } from '../utils'
import { TO_HANDLER_KEY } from '../runtimeHelpers'
const fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^\s*function(?:\s+[\w$]+)?\s*\(/
const fnExpRE =
/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\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