@less-is-more/less-js 1.4.32-0 → 1.4.32-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/router.js +10 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@less-is-more/less-js",
3
- "version": "1.4.32-0",
3
+ "version": "1.4.32-1",
4
4
  "description": "Fast develop kit for nodejs",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/router.js CHANGED
@@ -215,16 +215,16 @@ module.exports = class Router {
215
215
  if (!res.headers) {
216
216
  res.headers = {};
217
217
  }
218
- if (acceptEncoding.includes("gzip")) {
219
- content = zlib.gzipSync(content).toString("base64");
220
- res.headers["Content-Encoding"] = "gzip";
221
- } else if (acceptEncoding.includes("deflate")) {
222
- content = zlib.deflateSync(content).toString("base64");
223
- res.headers["Content-Encoding"] = "deflate";
224
- } else if (acceptEncoding.includes("br")) {
225
- content = zlib.brotliCompressSync(content).toString("base64");
226
- res.headers["Content-Encoding"] = "br";
227
- }
218
+ }
219
+ if (acceptEncoding.includes("br")) {
220
+ content = zlib.brotliCompressSync(content).toString("base64");
221
+ res.headers["Content-Encoding"] = "br";
222
+ } else if (acceptEncoding.includes("gzip")) {
223
+ content = zlib.gzipSync(content).toString("base64");
224
+ res.headers["Content-Encoding"] = "gzip";
225
+ } else if (acceptEncoding.includes("deflate")) {
226
+ content = zlib.deflateSync(content).toString("base64");
227
+ res.headers["Content-Encoding"] = "deflate";
228
228
  }
229
229
  }
230
230
  res.send(content);