We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e0c60b commit 5516b87Copy full SHA for 5516b87
index.js
@@ -58,14 +58,11 @@ function compression (options) {
58
var optsBrotli = objectAssign({}, opts.brotli)
59
60
if (hasBrotliSupport) {
61
- if (optsBrotli.params === undefined) {
62
- optsBrotli.params = {}
63
- }
+ var brotliParams = {}
+ brotliParams[zlib.constants.BROTLI_PARAM_QUALITY] = 4
64
65
// set the default level to a reasonable value with balanced speed/ratio
66
- if (optsBrotli.params[zlib.constants.BROTLI_PARAM_QUALITY] === undefined) {
67
- optsBrotli.params[zlib.constants.BROTLI_PARAM_QUALITY] = 4
68
+ optsBrotli.params = Object.assign(brotliParams, optsBrotli.params)
69
}
70
71
// options
0 commit comments