mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +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
|
if func.r#async
|
||||||
&& func.generator
|
&& func.generator
|
||||||
&& !func.is_typescript_syntax()
|
&& !func.is_typescript_syntax()
|
||||||
&& matches!(
|
&& AsyncGeneratorExecutor::is_class_method_like_ancestor(ctx.parent())
|
||||||
ctx.parent(),
|
|
||||||
// `class A { async foo() {} }` | `({ async foo() {} })`
|
|
||||||
Ancestor::MethodDefinitionValue(_) | Ancestor::ObjectPropertyValue(_)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
self.executor.transform_function_for_method_definition(func, ctx);
|
self.executor.transform_function_for_method_definition(func, ctx);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue