Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(transformer/class-properties): rename *_owner to owned_* #7855

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,8 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
// `o?.Foo.#self.self?.self.unicorn;` -> `(result ? void 0 : object)?.self.unicorn`
// ^^^^^^^^^^^^^^^^^ the object has transformed, if the current member is optional,
// then we need to wrap it to a conditional expression
let object_owner = ctx.ast.move_expression(object);
*object = Self::wrap_conditional_check(result, object_owner, ctx);
let owned_object = ctx.ast.move_expression(object);
*object = Self::wrap_conditional_check(result, owned_object, ctx);
None
} else {
Some(result)
Expand Down Expand Up @@ -1359,8 +1359,8 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {

// After the below transformation, the `callee` will be a temp variable.
let result = self.transform_expression_to_wrap_nullish_check(callee, ctx);
let callee_owner = ctx.ast.move_expression(callee);
Self::substitute_callee_and_insert_context(call, callee_owner, context, ctx);
let owned_callee = ctx.ast.move_expression(callee);
Self::substitute_callee_and_insert_context(call, owned_callee, context, ctx);
result
}

Expand Down
Loading