Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1f3b595

Browse files
rufmanjoshwiens
authored andcommitted
fix: Correct zopfli options
1 parent 78380e0 commit 1f3b595

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ function CompressionPlugin(options) {
2020
}
2121
this.algorithm = function (content, fn) {
2222
zopfli.gzip(content, {
23-
verbose: options.verbose ? options.verbose : false,
24-
verbose_more: options.verbose ? options.verbose : false,
25-
numiterations: options.verbose ? options.verbose : 15,
26-
blocksplitting: options.verbose ? options.verbose : true,
27-
blocksplittinglast: options.verbose ? options.verbose : false,
28-
blocksplittingmax: options.verbose ? options.verbose : 15
23+
verbose: options.hasOwnProperty('verbose') ? options.verbose : false,
24+
verbose_more: options.hasOwnProperty('verbose_more') ? options.verbose_more : false,
25+
numiterations: options.numiterations ? options.numiterations : 15,
26+
blocksplitting: options.hasOwnProperty('blocksplitting') ? options.blocksplitting : true,
27+
blocksplittinglast: options.hasOwnProperty('blocksplittinglast') ? options.blocksplittinglast : false,
28+
blocksplittingmax: options.blocksplittingmax ? options.blocksplittingmax : 15
2929
}, fn);
3030
};
3131
} else {

0 commit comments

Comments
 (0)