@@ -49,8 +49,9 @@ function parse_source_map(content) {
4949function set_shorthand ( name , options , keys ) {
5050 keys . forEach ( function ( key ) {
5151 if ( options [ key ] ) {
52- if ( typeof options [ key ] != "object" ) options [ key ] = { } ;
53- if ( ! ( name in options [ key ] ) ) options [ key ] [ name ] = options [ name ] ;
52+ var defs = { } ;
53+ defs [ name ] = options [ name ] ;
54+ options [ key ] = defaults ( options [ key ] , defs ) ;
5455 }
5556 } ) ;
5657}
@@ -105,7 +106,7 @@ function minify(files, options) {
105106 if ( options . keep_fargs ) set_shorthand ( "keep_fargs" , options , [ "compress" , "mangle" , "rename" ] ) ;
106107 if ( options . keep_fnames ) set_shorthand ( "keep_fnames" , options , [ "compress" , "mangle" , "rename" ] ) ;
107108 if ( options . module === undefined && ! options . ie ) options . module = true ;
108- if ( options . module ) set_shorthand ( "module" , options , [ "compress" , "parse" ] ) ;
109+ if ( options . module ) set_shorthand ( "module" , options , [ "compress" , "output" , " parse" ] ) ;
109110 if ( options . toplevel !== undefined ) set_shorthand ( "toplevel" , options , [ "compress" , "mangle" , "rename" ] ) ;
110111 if ( options . v8 ) set_shorthand ( "v8" , options , [ "mangle" , "output" , "rename" ] ) ;
111112 if ( options . webkit ) set_shorthand ( "webkit" , options , [ "compress" , "mangle" , "output" , "rename" ] ) ;
0 commit comments