Skip to content

When minifing comma operator syntax, the behaviour of the minified code changes #474

@DenisaSurdu

Description

@DenisaSurdu

The problem

Given this function:
function test2(){ var a = "some text"; return a+="help", a+=" some more help";} which returns "some texthelp some more help"
When minified, gets converted into something like:
function test2(){ var a = "some text"; return a+"help", a+=" some more help";} which returns "some text some more help"

Note the return a+"help"

This represents an issue when including in cassette .min.js files with a similar syntax as above - especially when the .min.js are 3rd party libraries. (I have noticed this when I used cassette with the colors plugin from Froala)

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