JSON.stringify should throw TypeError("cyclic object value") when a circular reference is found. #545
Labels
bug
Something isn't working
builtins
PRs and Issues related to builtins/intrinsics
good first issue
Good for newcomers
Describe the bug
JSON.stringify should throw a TypeError when it encounters a circular reference. Currently, the stack overflows.
To Reproduce
Expected behavior
A TypeError should be thrown. See NOTE 1 in the spec
Build environment (please complete the following information):
Additional context
You can find more information on MDN.
The text was updated successfully, but these errors were encountered: