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.
- package/package.json +1 -1
- package/src/response.js +2 -2
package/package.json
CHANGED
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
|
-
|
|
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
|
|