-
Notifications
You must be signed in to change notification settings - Fork 77
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
Initialization of columns Property for xxxParse(...) methods #31
Comments
Yep, a bug. I’d probably change the assignment to: rows.columns = columns || []; |
I just pushed a PR to save you the trouble 😄 I thought the initialization could happen right when Both approaches should work, if you want me to change the PR to your fallback assignment, I could quickly change it. your call. |
8 tasks
@mbostock I changed the PR to use the fallback approach: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the edge case where the to-be-parsed string passed into
xxxParse(...)
methods is empty, thecolumn
property of the returned parsed array isundefined
.Although this is an edge case, it seems preferable to return an empty array of column names for consistency.
(Thanks @azoson for pointing this behaviour out in DefinitelyTyped/DefinitelyTyped#21092 and DefinitelyTyped/DefinitelyTyped#21162 . cc @gustavderdrache)
The text was updated successfully, but these errors were encountered: