Skip to content

Small issue with ternary (?:) replacement #45

@ThomasMldr

Description

@ThomasMldr

This

if (condition) {
  this.text = "one";
} else {
  this.text = "two";
}

becomes:
condition ? this.text = "one" : this.text = "two";
instead of the desired:
this.text = condition ? "one" : "two";

This only happens when the assignment happens to a variable beginning with this..
if it was just text instead of this.text the replace happens correctly (text = condition ? "one" : "two";)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions