Created
June 15, 2021 06:38
-
-
Save Costava/a7e41a206145f3a122b2f9299a83c2ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let foo = {num: 11}; | |
let bar = {num: 22}; | |
foo.other = bar; | |
bar.other = foo; | |
let myList = [foo, bar]; | |
JSON.stringify(myList); // Fails | |
// Firefox 89: Uncaught TypeError: cyclic object value | |
// Chromium 91: Uncaught TypeError: Converting circular structure to JSON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment