mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This fixes the case where calling `res.end()` is `getServerSideProps` would cause the request to hang in development due to our `Proxy` around `res` causing internal `ServerResponse` fields to not be available ([related post](https://javascript.info/proxy#built-in-objects-internal-slots)). I also migrated our `getServerSideProps` test suite to an e2e suite with a test for this case. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: https://github.com/vercel/next.js/issues/15118 Fixes: https://github.com/vercel/next.js/issues/32824 Closes: https://github.com/vercel/next.js/pull/33129
16 lines
225 B
JavaScript
16 lines
225 B
JavaScript
export async function getServerSideProps() {
|
|
return {
|
|
props: (async function () {
|
|
return {
|
|
text: 'promise',
|
|
}
|
|
})(),
|
|
}
|
|
}
|
|
|
|
export default ({ text }) => (
|
|
<>
|
|
<div>hello {text}</div>
|
|
</>
|
|
)
|