Pass mangle options to `figure_out_scope` and `compute_char_frequence`
authorRichard van Velzen <rvanvelzen1@gmail.com>
Mon, 5 Jan 2015 18:10:32 +0000 (19:10 +0100)
committerRichard van Velzen <rvanvelzen1@gmail.com>
Mon, 5 Jan 2015 18:10:32 +0000 (19:10 +0100)
Fix #219. Because the options were not set and `toplevel` is `false` by default, some toplevel names would sometimes not be mangled correctly.

tools/node.js

index 9e9c2c1..4bc8517 100644 (file)
@@ -97,8 +97,8 @@ exports.minify = function(files, options) {
 
     // 3. mangle
     if (options.mangle) {
-        toplevel.figure_out_scope();
-        toplevel.compute_char_frequency();
+        toplevel.figure_out_scope(options.mangle);
+        toplevel.compute_char_frequency(options.mangle);
         toplevel.mangle_names(options.mangle);
     }