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

Export buttons error #32

Closed
bytestream opened this issue Sep 21, 2015 · 5 comments
Closed

Export buttons error #32

bytestream opened this issue Sep 21, 2015 · 5 comments

Comments

@bytestream
Copy link

When trying to use the CSV export button I'm getting an error on numeric data:
a[i].replace is not a function [buttons.html5.js - line 311]

This is the data in my table:

Department  Count
Support         2

I resolved the error by adding .toString() before the replace:

s += boundary ?
         boundary + a[i].toString().replace( boundary, '\\'+boundary ) + boundary :
         a[i];

Similar export code exists in buttons.flash.js

I hope this helps.

@DataTables
Copy link
Collaborator

Have you tried the version of the file in this repo? I think this should already be fixed. If not, please link to a test case showing the issue.

@bytestream
Copy link
Author

Ah you're right. This has been fixed in the master.

I was using ~1.0.3 provided by bower. Updating bower to master resolved it.

Ps. Thanks for the fast response.

@wagedomain
Copy link

Any word on when this fix will be released? I don't want to push nightly code to production.

@DataTables
Copy link
Collaborator

Probably next week

@wagedomain
Copy link

For anyone else with this issue, it affects both versions 1.0.2 and 1.0.3. It seems safe to rollback to 1.0.1, though.

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