1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/test/integration/basic/pages/circular-json-error.js
Tim Neutkens b3045cc7a9
Implement circular JSON err.sh link (#6149)
* Implement circular JSON err.sh link

* Add test for getInitialProps returning circular json

* Make test warn less

* Fix tests

* Add reference to original tests
2019-01-27 16:12:17 +01:00

18 lines
335 B
JavaScript

function CircularJSONErrorPage () {
return <div>This won't render</div>
}
CircularJSONErrorPage.getInitialProps = () => {
// This creates a circular JSON object
const object = {}
object.arr = [
object, object
]
object.arr.push(object.arr)
object.obj = object
return object
}
export default CircularJSONErrorPage