digitalsparky / jekyll-minifier

Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
GNU General Public License v3.0
245 stars 25 forks source link

Default config error with uglifier_args #49

Open simonkurka opened 5 years ago

simonkurka commented 5 years ago

with the uglifier_args: # Default: (empty) key set the build process fails with

NoMethodError: undefined method `map' for nil:NilClass
  /usr/lib/ruby/gems/2.6.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:44:in `output_html'
  /usr/lib/ruby/gems/2.6.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:32:in `output_compressed'
  /usr/lib/ruby/gems/2.6.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:182:in `write'
...

Commenting the uglifier_args line solves the issue.

I think this means the key is not empty by default?!

Tested with v0.1.10