rsnext/packages/next/pages
Simon Knott abf9f75821
Fix bug with "Circular Structure" error (#23905)
* 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 <jj@jjsweb.site>
2022-02-09 20:28:24 -06:00
..
_app.tsx Improve and refactor some types (#31704) 2021-11-25 10:46:00 +01:00
_document-concurrent.tsx Deprecate concurrentFeatures with runtime (#34068) 2022-02-08 14:16:46 +01:00
_document.tsx Fix bug with "Circular Structure" error (#23905) 2022-02-09 20:28:24 -06:00
_error.tsx Escape from next head in rsc _error page (#32624) 2021-12-21 19:24:57 +00:00