-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ie8 and mangle can result in incorrect Javascript code in the presence of try...except blocks #3215
Labels
Comments
@jfly thanks for the detailed report - fix is on the way. |
Merged
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Jul 17, 2018
Whooo! Thanks for the quick response! |
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Jul 17, 2018
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Jul 17, 2018
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Jul 17, 2018
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Jul 18, 2018
alexlamsl
added a commit
that referenced
this issue
Jul 19, 2018
jfly
added a commit
to jfly/worldcubeassociation.org
that referenced
this issue
Aug 7, 2018
This reverts commit 9720cae. This is safe to do because we upgraded uglifier in 71204b6 to 4.1.17, which brings along uglifyjs 3.4.6, which includes a fix for mishoo/UglifyJS#3215. This fixes thewca#3047.
jonatanklosko
pushed a commit
to thewca/worldcubeassociation.org
that referenced
this issue
Aug 13, 2018
This reverts commit 9720cae. This is safe to do because we upgraded uglifier in 71204b6 to 4.1.17, which brings along uglifyjs 3.4.6, which includes a fix for mishoo/UglifyJS#3215. This fixes #3047.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Uglify version (
uglifyjs -V
)3.4.5
JavaScript input
The
uglifyjs
CLI command executed orminify()
options used.--ie8 --mangle
JavaScript output.
Note how the produced javascript code sets a
createEvent
variable in thecatch
above, despite the fact thatcreateEvent
was renamed ton
in the other two places where the original Javascript referred to it. This is incorrect behavior. I would expect the two occurrences ofcreateEvent
in thecatch
to also be changed ton
.The above code may look kind of weird, but it's a simplified version of this real life code from
autosize
: https://github.com/jackmoore/autosize/blob/6ae70cd3d28888eb858eef1167e6ed75d25dff7f/dist/autosize.js#L48-L60. See thewca/worldcubeassociation.org#3047 for more information about how we ran into this issue.The text was updated successfully, but these errors were encountered: