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

Papaparse in Cordova (Android , iOS) #766

Open
mirko77 opened this issue Feb 24, 2020 · 4 comments
Open

Papaparse in Cordova (Android , iOS) #766

mirko77 opened this issue Feb 24, 2020 · 4 comments

Comments

@mirko77
Copy link

mirko77 commented Feb 24, 2020

Hi All,

#320 is still an issue in both Android and iOS

xhr.status returns 0 in Android 9, the proposed solution works.

@pokoli
Copy link
Collaborator

pokoli commented Feb 24, 2020

Which is the proposed solution?
Does it make sense to include it as part of PapaParse? If yes, could you please submit a PR?

@mirko77
Copy link
Author

mirko77 commented Feb 24, 2020

#320 offers a solution:


So i changed in the papaparse _chunkLoaded function, this line
if (xhr.status < 200 || xhr.status >= 400)
by this one:
if (!((xhr.status >= 200 && xhr.status < 300) || (xhr.status==0 && xhr.responseText.length>0)))

Without that, parsing currently fails on both Android and iOS

@pokoli
Copy link
Collaborator

pokoli commented Feb 24, 2020

Could you please add a PR with a comment explaining the reasoning? I will be happy to merge it.

@mirko77
Copy link
Author

mirko77 commented Feb 24, 2020

I'll do it soon, thanks

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

No branches or pull requests

2 participants