mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(transformer/async-generator-functions): only transform object method in exit_function (#7200)
close: #7175
This commit is contained in:
parent
293d072e77
commit
c82b273154
1 changed files with 1 additions and 5 deletions
|
|
@ -145,11 +145,7 @@ impl<'a, 'ctx> Traverse<'a> for AsyncGeneratorFunctions<'a, 'ctx> {
|
|||
if func.r#async
|
||||
&& func.generator
|
||||
&& !func.is_typescript_syntax()
|
||||
&& matches!(
|
||||
ctx.parent(),
|
||||
// `class A { async foo() {} }` | `({ async foo() {} })`
|
||||
Ancestor::MethodDefinitionValue(_) | Ancestor::ObjectPropertyValue(_)
|
||||
)
|
||||
&& AsyncGeneratorExecutor::is_class_method_like_ancestor(ctx.parent())
|
||||
{
|
||||
self.executor.transform_function_for_method_definition(func, ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue