You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Writing self-executing functions with !function(){}() is sometimes unsafe #625
A and B cause the same side effects, but the result of each expression is different, 5 in A and false in B
I am uglifying code files that look something like A, which are rewritten to B, and I am running into this issue because the minified files are passed to a processor that uses the result of eval() on the minified code.
I did not find a flag to uglify that controls this behavior, but I was curious whether:
Such a flag exists
There is a way around this problem without hacking around uglify
There should be a flag (or patch) for this
Other thoughts of people who understand Uglify better than I do
Activity
mishoo commentedon Jan 27, 2015
There is a flag, try passing
-c negate_iife=false.michaelficarra commentedon Jan 28, 2015
That is not the right answer. You are looking to preserve the program completion value. See #543 for the previous discussion about this.
mpcref commentedon Jan 30, 2015
I propose the following fix:
never negate an IIFR that is also the program completion value.
New issue #628 created.
rvanvelzen commentedon Feb 11, 2015
Track #640 for follow-up.
process code with implicit return statement
process code with implicit return statement
process code with implicit return statement
process code with implicit return statement (#1522)