marcoslhc / jquery-csv

Automatically exported from code.google.com/p/jquery-csv
MIT License
0 stars 0 forks source link

Passing empty CSV file to function toObjects() breaks the code #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an empty .csv file
2. Pass it to $.csv.toObjects() function
3. Observe the error in the console

What is the expected output? What do you see instead?
It is expected to return an empty object.
It shows an error in the console:
Uncaught TypeError: Cannot call method 'replace' of undefined        
jquery.csv.js:501

What version of the product are you using? On what operating system?
Latest version 0.71 on Mac OSX

Please provide any additional information below.
You can even reproduce it at your Basic Usage demo: 
http://jquery-csv.googlecode.com/git/examples/basic-usage.html
1. Click on toObjects() tab
2. Delete the input data (leave it empty)
3. Run!
4. Observe the console

Original issue reported on code.google.com by jonasha...@gmail.com on 5 Jun 2013 at 2:38