Skip to content

Conversation

@yumauri
Copy link

@yumauri yumauri commented Feb 20, 2023

Wrap JSON.stringify in try-catch to avoid any stringify exception, like with circular object

@yumauri
Copy link
Author

yumauri commented Feb 20, 2023

There are bunch of checks inside JSON.stringify, I conclude you are trying to avoid try-catch, maybe because of performance concerns, but I think you cannot foresee and check all possible objects, which could cause an error, so try-catch is vital here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants