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

Scope issues with Rename #521

Open
analtevs opened this issue Sep 7, 2022 · 0 comments
Open

Scope issues with Rename #521

analtevs opened this issue Sep 7, 2022 · 0 comments

Comments

@analtevs
Copy link

analtevs commented Sep 7, 2022

this example comes from some obfuscated code

function Os(n){
...
}
...
const i = function t() {
  var e = Os;
  new MutationObserver((t=>{
    var r = e; 
    for (const e of t) {
      if (e[r(1849)] !== r(1336)) continue;
      for (const t of e['addedNodes']) if (t['tagName'] === r(416) && 'modulepreload' === t['rel']) i(t)
    }
  })) [e(2593)](document, {childList: !![], subtree: !![]});
}

when renaming e = Os i expected r to be renamed. the const e is getting in the way of this with regards to scope.

posted an example on astexplorer here

if cosnt e is manually renamed then i do get the expected results (r = Os)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant