@less-is-more/less-js 1.4.33-2 → 1.4.33-3

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 +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@less-is-more/less-js",
3
- "version": "1.4.33-2",
3
+ "version": "1.4.33-3",
4
4
  "description": "Fast develop kit for nodejs",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/router.js CHANGED
@@ -161,7 +161,11 @@ module.exports = class Router {
161
161
  }
162
162
  } else {
163
163
  const data = req.body || (await promisify(content)(req));
164
- req.sourceBody = decodeURIComponent(data.toString());
164
+ try {
165
+ req.sourceBody = decodeURIComponent(data.toString());
166
+ } catch (e) {
167
+ req.sourceBody = data.toString();
168
+ }
165
169
  req.body = qs.parse(data.toString());
166
170
  }
167
171
  }