pull/16060/head
ComputerGuy 4 months ago
parent dd4b8b97ef
commit 0901a1bad1

@ -52,11 +52,7 @@ const callees = {
* @returns {Expression | null} * @returns {Expression | null}
*/ */
function build_assignment(operator, left, right, context) { function build_assignment(operator, left, right, context) {
if ( if (context.state.analysis.runes && left.type === 'MemberExpression') {
context.state.analysis.runes &&
left.type === 'MemberExpression' &&
left.object.type === 'ThisExpression'
) {
const name = get_name(left.property); const name = get_name(left.property);
const field = name && context.state.state_fields.get(name); const field = name && context.state.state_fields.get(name);
@ -74,7 +70,7 @@ function build_assignment(operator, left, right, context) {
let value = /** @type {Expression} */ (context.visit(right, child_state)); let value = /** @type {Expression} */ (context.visit(right, child_state));
if (dev) { if (dev) {
const declaration = context.path.find( const declaration = context.path.findLast(
(parent) => parent.type === 'ClassDeclaration' || parent.type === 'ClassExpression' (parent) => parent.type === 'ClassDeclaration' || parent.type === 'ClassExpression'
); );
value = b.call( value = b.call(

Loading…
Cancel
Save