Uglify mutates code incorrectly
Closed this issue · 2 comments
jpike88 commented
$rootScope.form = {
property: value
};
if ($rootScope.form.template.flags !== undefined) {
if ($rootScope.form.template.flags.includeUsageLog == true) {
// more stuff
}
}
Gets mutated to this:
if (e.form = {
property: value
},
1 == e.form.template.flags.includeUsageLog) {
// more stuff
}
jpike88 commented
The result is that if template doesn't have the flags property, an error is thrown.
terinjokes commented
This project is a wrapper around UglifyJS. Make sure you're running the latest version of 3.x, and if the issue persists, file a bug with them.