Skip to content

Commit

Permalink
Revert #4021
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Jan 13, 2020
1 parent 45536e1 commit e934fef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion lib/transmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ internals.transmit = function (response) {
request.raw.res[Config.symbol] = { request };

if (response.variety === 'plain') {
request.raw.res[Config.symbol].result = response.source === '' || response._isPayloadSupported() ? response.source : null;
request.raw.res[Config.symbol].result = response._isPayloadSupported() ? response.source : null;
}
}

Expand Down
8 changes: 0 additions & 8 deletions test/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,6 @@ describe('Response', () => {
expect(res.headers['content-type']).to.equal('text/plain; something=something; charset=utf-8');
});

it('retains empty string', async () => {

const server = Hapi.server();
server.route({ method: 'GET', path: '/', handler: () => '' });
const res = await server.inject('/');
expect(res.result).to.equal('');
});

describe('_setSource()', () => {

it('returns an empty string response', async () => {
Expand Down

0 comments on commit e934fef

Please sign in to comment.