Skip to content

Minifying JavaScript reuses same array for two different variables. #147

Description

@robtimus

I have a source file that contains the following code:

    this.categories = [];
    this.links = [];

When I call minify on this file, the output creates just one array and assigns it to both properties:

this.categories=this.links=[];

This obviously is not the same, because if I now add something to this.categories then this.links will contain the same element. I expect the output to contain this instead:

this.categories=[];this.links=[]

For me this is a reason to not use minify at this moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions