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

Grouping parantheses for destructuring is moved around, making code invalid. #346

Open
FraktalInverTer opened this issue Dec 27, 2022 · 0 comments

Comments

@FraktalInverTer
Copy link

FraktalInverTer commented Dec 27, 2022

Describe the bug
Grouping parantheses for destructuring is moved around, making code invalid.

To Reproduce
Using the following code settings:

            AmdSupport = true,
            EvalTreatment = EvalTreatment.MakeAllSafe,
            OutputMode = OutputMode.SingleLine,
            ScriptVersion = ScriptVersion.EcmaScript6,
            TermSemicolons = true,
            MinifyCode = true,

Nuglify replaces:

 validations
            .filter((validation) => !!validation)
            .forEach((validation) => {
                ({ validationValid, allInGroupEmpty, validForm } = this.ValidateValidation(validationValid, validation, allInGroupEmpty, validatorMessages, saveFrameId, validForm));
            });

Minified output or stack trace

u.filter(n=>!!n)
    .forEach(n=> {
        ({validationValid:e,allInGroupEmpty:f,validForm:r})=this.ValidateValidation(e,n,f,s,i,r)
    });

Excepted output code

u.filter(n=>!!n)
    .forEach(n=> {
        ({validationValid:e,allInGroupEmpty:f,validForm:r}=this.ValidateValidation(e,n,f,s,i,r));
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants