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

Commit 818cb91

Browse files
authored
Add finished to res (#117)
* 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
1 parent 18a7082 commit 818cb91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/templates/createResponseObject.js

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ const createResponseObject = ({ onResEnd }) => {
7575
}
7676
}
7777

78+
res.finished = true;
79+
res.writableEnded = true;
7880
// Call onResEnd handler with the response object
7981
onResEnd(response);
8082
};

0 commit comments

Comments
 (0)