mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
* Fix bug with "Circular Structure" error Since `-1` is truthy, every JSON.stringify error is mistaken to be `circular structure`. This commit fixes that behaviour, so that other errors like `Do not know how to serialize Bigint` (see https://github.com/blitz-js/babel-plugin-superjson-next/issues/63) aren't swallowed. * Add integration test This may be thought of as being a pretty contrived example, but it's exactly what happened in https://github.com/blitz-js/babel-plugin-superjson-next/issues/63. Co-authored-by: JJ Kasper <[email protected]>
17 lines
332 B
JavaScript
17 lines
332 B
JavaScript
export async function getStaticProps() {
|
|
return {
|
|
props: {
|
|
topics: [
|
|
{
|
|
number: '22',
|
|
},
|
|
],
|
|
},
|
|
}
|
|
}
|
|
|
|
export default function Repro(props) {
|
|
props.topics[0].number = 22n // basically what happened in https://github.com/blitz-js/babel-plugin-superjson-next/issues/63
|
|
return <></>
|
|
}
|