ultimate-express 1.0.5 → 1.0.6

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/response.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-express",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "The Ultimate Express. Fastest http server with full Express compatibility, based on uWebSockets.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/response.js CHANGED
@@ -185,7 +185,7 @@ module.exports = class Response extends Writable {
185
185
  body = '';
186
186
  } else if(typeof body === 'object') {
187
187
  if(!(body instanceof ArrayBuffer)) {
188
- body = stringify(body);
188
+ return this.json(body);
189
189
  }
190
190
  } else if(typeof body === 'number') {
191
191
  if(arguments[1]) {
@@ -421,7 +421,7 @@ module.exports = class Response extends Writable {
421
421
  if(!name) {
422
422
  name = Path.basename(path);
423
423
  }
424
- if(!opts.root) {
424
+ if(!opts.root && !isAbsolute(path)) {
425
425
  opts.root = process.cwd();
426
426
  }
427
427