@@ -81,7 +81,10 @@ exports.init = function(grunt) {
8181 // Need to call this before we mangle or compress,
8282 // and call after any compression or ast altering
8383 if ( options . expression === false ) {
84- topLevel . figure_out_scope ( { screw_ie8 : options . screwIE8 , cache : topLevelCache } ) ;
84+ topLevel . figure_out_scope ( {
85+ screw_ie8 : options . screwIE8 ,
86+ cache : topLevelCache
87+ } ) ;
8588 }
8689
8790 if ( options . compress !== false ) {
@@ -91,19 +94,25 @@ exports.init = function(grunt) {
9194 if ( options . compress . warnings !== true ) {
9295 options . compress . warnings = false ;
9396 }
94- if ( options . screwIE8 ) {
95- options . compress . screw_ie8 = true ;
97+ if ( options . screwIE8 === false ) {
98+ options . compress . screw_ie8 = false ;
9699 }
97100 var compressor = UglifyJS . Compressor ( options . compress ) ;
98101 topLevel = topLevel . transform ( compressor ) ;
99102
100103 // Need to figure out scope again after source being altered
101104 if ( options . expression === false ) {
102- topLevel . figure_out_scope ( { screw_ie8 : options . screwIE8 , cache : topLevelCache } ) ;
105+ topLevel . figure_out_scope ( {
106+ screw_ie8 : options . screwIE8 ,
107+ cache : topLevelCache
108+ } ) ;
103109 }
104110 }
105111
106- var mangleExclusions = { vars : [ ] , props : [ ] } ;
112+ var mangleExclusions = {
113+ vars : [ ] ,
114+ props : [ ]
115+ } ;
107116 if ( options . reserveDOMProperties ) {
108117 mangleExclusions = UglifyJS . readDefaultReservedFile ( ) ;
109118 }
@@ -123,7 +132,7 @@ exports.init = function(grunt) {
123132 cache = UglifyJS . readNameCache ( options . nameCache , 'props' ) ;
124133 }
125134
126- if ( typeof ( options . mangleProperties ) !== 'undefined' && options . mangleProperties !== false ) {
135+ if ( typeof options . mangleProperties !== 'undefined' && options . mangleProperties !== false ) {
127136 // if options.mangleProperties is a boolean (true) convert it into an object
128137 if ( typeof options . mangleProperties !== 'object' ) {
129138 options . mangleProperties = { } ;
@@ -140,16 +149,19 @@ exports.init = function(grunt) {
140149
141150 // Need to figure out scope again since topLevel has been altered
142151 if ( options . expression === false ) {
143- topLevel . figure_out_scope ( { screw_ie8 : options . screwIE8 , cache : topLevelCache } ) ;
152+ topLevel . figure_out_scope ( {
153+ screw_ie8 : options . screwIE8 ,
154+ cache : topLevelCache
155+ } ) ;
144156 }
145157 }
146158
147159 if ( options . mangle !== false ) {
148160 if ( options . mangle === true ) {
149161 options . mangle = { } ;
150162 }
151- if ( options . screwIE8 ) {
152- options . mangle . screw_ie8 = true ;
163+ if ( options . screwIE8 === false ) {
164+ options . mangle . screw_ie8 = false ;
153165 }
154166 // disabled due to:
155167 // 1) preserve stable name mangling
@@ -195,7 +207,7 @@ exports.init = function(grunt) {
195207 if ( options . sourceMap ) {
196208 // Set all paths to forward slashes for use in the browser
197209 var sourceMappingURL ;
198- sourceMappingURL = options . destToSourceMap . match ( / ^ h t t p [ s ] ? \ :\/ \/ / ) === null ? uriPath ( options . destToSourceMap ) : options . destToSourceMap ;
210+ sourceMappingURL = options . destToSourceMap . match ( / ^ h t t p [ s ] ? : \/ \/ / ) === null ? uriPath ( options . destToSourceMap ) : options . destToSourceMap ;
199211 min += '\n//# sourceMappingURL=' + sourceMappingURL ;
200212 }
201213
@@ -220,8 +232,8 @@ exports.init = function(grunt) {
220232 outputOptions . preamble = options . banner ;
221233 }
222234
223- if ( options . screwIE8 ) {
224- outputOptions . screw_ie8 = true ;
235+ if ( options . screwIE8 === false ) {
236+ outputOptions . screw_ie8 = false ;
225237 }
226238
227239 if ( options . sourceMap ) {
0 commit comments