fix(reactivity-transform): should not rewrite catch param (#5711)
fix #5709
This commit is contained in:
@@ -566,6 +566,16 @@ export function transformAST(
|
||||
return
|
||||
}
|
||||
|
||||
// catch param
|
||||
if (node.type === 'CatchClause') {
|
||||
scopeStack.push((currentScope = {}))
|
||||
if (node.param && node.param.type === 'Identifier') {
|
||||
registerBinding(node.param)
|
||||
}
|
||||
walkScope(node.body)
|
||||
return
|
||||
}
|
||||
|
||||
// non-function block scopes
|
||||
if (node.type === 'BlockStatement' && !isFunctionType(parent!)) {
|
||||
scopeStack.push((currentScope = {}))
|
||||
|
||||
Reference in New Issue
Block a user