@server/next 0.17.2 → 0.17.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/index.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@server/next",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "An experimental reimplementation of server.js focused on the DX",
5
5
  "homepage": "https://node-server.com/",
6
6
  "repository": "https://github.com/franciscop/server-next.git",
package/src/index.js CHANGED
@@ -227,8 +227,8 @@ export default function (options = {}, plugins) {
227
227
  res.writeHead(ctx.res.status, ctx.res.headers);
228
228
 
229
229
  // If it's not a pipe, e.g. a String, make it a pipe
230
- if (!ctx.res.body.pipe) {
231
- ctx.res.body = Readable.from([ctx.res.body]);
230
+ if (!ctx.res.body || !ctx.res.body.pipe) {
231
+ ctx.res.body = Readable.from([ctx.res.body || ""]);
232
232
  }
233
233
 
234
234
  if (compress) {