File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ exports.init = function(grunt) {
88
88
if ( options . compress . warnings !== true ) {
89
89
options . compress . warnings = false ;
90
90
}
91
+ if ( options . screwIE8 ) {
92
+ options . compress . screw_ie8 = true ;
93
+ }
91
94
var compressor = UglifyJS . Compressor ( options . compress ) ;
92
95
topLevel = topLevel . transform ( compressor ) ;
93
96
@@ -134,6 +137,12 @@ exports.init = function(grunt) {
134
137
}
135
138
136
139
if ( options . mangle !== false ) {
140
+ if ( options . mangle === true ) {
141
+ options . mangle = { } ;
142
+ }
143
+ if ( options . screwIE8 ) {
144
+ options . mangle . screw_ie8 = true ;
145
+ }
137
146
// disabled due to:
138
147
// 1) preserve stable name mangling
139
148
// 2) it increases gzipped file size, see https://github.com/mishoo/UglifyJS2#mangler-options
Original file line number Diff line number Diff line change @@ -128,11 +128,6 @@ module.exports = function(grunt) {
128
128
options . destToSourceMap = destToSourceMapPath + sourceMapBasename ;
129
129
}
130
130
131
- if ( options . screwIE8 ) {
132
- if ( options . mangle ) { options . mangle . screw_ie8 = true ; }
133
- if ( options . compress ) { options . compress . screw_ie8 = true ; }
134
- }
135
-
136
131
// Minify files, warn and fail on error.
137
132
var result ;
138
133
try {
You can’t perform that action at this time.
0 commit comments