mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
b3045cc7a9
* Implement circular JSON err.sh link * Add test for getInitialProps returning circular json * Make test warn less * Fix tests * Add reference to original tests
18 lines
335 B
JavaScript
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
|