Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Conversation

cpm828
Copy link

@cpm828 cpm828 commented Jul 7, 2017

When I use jsonp request, if api response result as below

callback('{"timestamp": 1499421237, "nonceStr": "kAi5na4ckNG3uv3xg9MVdP"}');

We must use JSON.parse twice, so I think it's necessary to add a judge with body = typeof result === 'string' ? result : JSON.stringify(result)

What do you think!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant