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

Options arg not really optional? #48

Closed
evanplaice opened this issue Sep 9, 2015 · 3 comments
Closed

Options arg not really optional? #48

evanplaice opened this issue Sep 9, 2015 · 3 comments
Labels
Milestone

Comments

@evanplaice
Copy link
Owner

From [email protected] on February 14, 2015 20:39:25

What steps will reproduce the problem? 1.Pass a two arg call to $.csv.toObjects(csvData, callback) 2. 3. What is the expected output? What do you see instead? Callback is is not invoked. If an empty object is passed as second arg:

$.csv.toObjects(csvData, {}, callback)

then the callback is invoked. What version of the product are you using? On what operating system? 0.71 Please provide any additional information below. Maybe its just my understanding of optional args .... if both "optional" args need to be present, maybe the docs need amending?

Original issue: http://code.google.com/p/jquery-csv/issues/detail?id=47

@evanplaice evanplaice added this to the backlog milestone Sep 9, 2015
@evanplaice
Copy link
Owner Author

From [email protected] on February 14, 2015 20:49:03

You're correct.

This issue hasn't come up yet because using jquery-csv in node.js is not the usual use case.

This can most likely be fixed by applying explicit type checking when only 2 arguments are present. I'll look into it.

@evanplaice
Copy link
Owner Author

From [email protected] on February 21, 2015 18:53:18

It me some time to work out what was going on since it didn't throw any
error.

Might be worth changing the docs if the code can't be fixed in short term.

Joe

@coltonehrman
Copy link
Contributor

Fixed in #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants