@less-is-more/less-js 1.4.33 → 1.4.34-0

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 +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@less-is-more/less-js",
3
- "version": "1.4.33",
3
+ "version": "1.4.34-0",
4
4
  "description": "Fast develop kit for nodejs",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/router.js CHANGED
@@ -204,7 +204,9 @@ module.exports = class Router {
204
204
  if (result instanceof Ret) {
205
205
  content = result.toString();
206
206
  } else {
207
- if (typeof result === "string") {
207
+ if (Buffer.isBuffer(result)) {
208
+ content = result.toString();
209
+ } else if (typeof result === "string") {
208
210
  content = result;
209
211
  } else {
210
212
  content = JSON.stringify(result);