Skip to content

Invalid JS minification #867

@earthboundkid

Description

@earthboundkid

Input:

if (true) {
  const checkData = setInterval(() => {
    clearInterval(checkData);
  }, 100);
}

Output:

!0&&setInterval(()=>{clearInterval(checkData)},100)

Expected:

if (!0) {
const e=setInterval(()=>{clearInterval(e)},100})
}

The name checkData is dropped, resulting in invalid code.

See https://github.com/spotlightpa/poor-richard/pull/1008/files

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