Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid throwing an error on elements that can't be stringified #223

Merged
merged 1 commit into from
Jan 21, 2018
Merged

Avoid throwing an error on elements that can't be stringified #223

merged 1 commit into from
Jan 21, 2018

Conversation

juanjoDiaz
Copy link
Collaborator

Closes #215

Some elements can't be stringified. For example functions (JSON.stringify(() => {}) results on undefined).

We didn't handle those case, so json objects with non-stringifiable fields threw an error (not even related to the serialization).

This PR fixes that and add a test to cover this case.

@coveralls
Copy link

coveralls commented Jan 21, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 3a1188f on juanjoDiaz:bugfix/json_containing_functions into 7f7338f on zemirco:master.

@knownasilya knownasilya merged commit 679c687 into zemirco:master Jan 21, 2018
@juanjoDiaz juanjoDiaz deleted the bugfix/json_containing_functions branch February 4, 2018 22:08
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.

Serializing object containing a ctor function causes crash
3 participants