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

Use window.JSON only if it actually contains JSON API methods stringify and parse #9142

Merged
merged 1 commit into from Nov 2, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Nov 1, 2015

fixes #9130

When the builtin / native browser JSON API is available we use this one as it is much faster and should be more stable.

In this case the user overwrote window.JSON with a custom object like var JSON = {encode: function..., decode: function...}. We need to check whether the stringify and parse method is actually available

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Nov 1, 2015
@tsteur tsteur added this to the 2.15.1 milestone Nov 1, 2015
mattab pushed a commit that referenced this pull request Nov 2, 2015
Use window.JSON only if it actually contains JSON API methods stringify and parse
@mattab mattab merged commit 74babf2 into master Nov 2, 2015
@mattab mattab deleted the 9130 branch November 2, 2015 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants