Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
Add finished to res (#117)
Browse files Browse the repository at this point in the history
* add finished to res

This signals to Next that we aren't expecting any props to be returned in `getServersideProps` or `getInitialProps`

* Update createResponseObject.js
  • Loading branch information
JoviDeCroock authored Dec 14, 2020
1 parent 18a7082 commit 818cb91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/templates/createResponseObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ const createResponseObject = ({ onResEnd }) => {
}
}

res.finished = true;
res.writableEnded = true;
// Call onResEnd handler with the response object
onResEnd(response);
};
Expand Down

0 comments on commit 818cb91

Please sign in to comment.