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

Breaks conditional extends by removing parenthesis #326

Closed
johanjisu opened this issue Aug 31, 2018 · 6 comments · Fixed by estools/escodegen#404
Closed

Breaks conditional extends by removing parenthesis #326

johanjisu opened this issue Aug 31, 2018 · 6 comments · Fixed by estools/escodegen#404

Comments

@johanjisu
Copy link

Expected Behavior

This should work after obfuscation:

export default Target => class Events extends (Target || Base) {

}

Current Behavior

Obfuscation removes () around Target || Base, which breaks it.

(the code above is used for mixins, Base is an existing class)

Your Environment

ES6

@sanex3339
Copy link
Member

sanex3339 commented Aug 31, 2018

Hi, i'll look into this issue but currently i take a 1-2 months timeout with this project to doing renovations on my flat. So, until october i'll have no time to look into this.

If i'll have time - i'll fix it.

@sanex3339 sanex3339 added the bug label Aug 31, 2018
@johanjisu
Copy link
Author

We currently work around it by regexing the parentheses back in place after obfuscation, so we are ok anyway. But would be nice to have it fixed when you have the time. Good luck with the renovation and thanks for a great utility!

@asifshfq
Copy link

We currently work around it by regexing the parentheses back in place after obfuscation, so we are ok anyway. But would be nice to have it fixed when you have the time. Good luck with the renovation and thanks for a great utility!

Can you please elaborate this, because I am also facing the same issue.

@sanex3339
Copy link
Member

Hi. This is escodegen problem. Will try to create a PR to the escodegen

@sanex3339
Copy link
Member

sanex3339 commented Jan 6, 2020

I created the PR with the fix for escodegen
It is better to ping this PR, because maintainers are not so active:
estools/escodegen#404

@sanex3339
Copy link
Member

Fixed in 0.23.2 release

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

Successfully merging a pull request may close this issue.

3 participants