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

Use of global MODE before declaration caused uglify problem #1604

Closed
djehring opened this issue Dec 19, 2018 · 1 comment
Closed

Use of global MODE before declaration caused uglify problem #1604

djehring opened this issue Dec 19, 2018 · 1 comment

Comments

@djehring
Copy link

The global variable MODE is used in the code before it is declared. When this package is passed through js-uglify it breaks as these lines:

if (frame.multiline_frame ||
frame.mode === MODE.ForInitializer ||
frame.mode === MODE.Conditional) {
return;
}

are not parsed to use the uglified constants MODE_ForInitializer and Mode_Conditional.

Moving the declaration of mode before its use fixes this problem.

@bitwiseman
Copy link
Member

@djehring Can you submit a PR?

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