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
Fails if attribute is named 'set' #185
Comments
mrodrig
added a commit
that referenced
this issue
May 19, 2021
As reported in #185, there was a bug where header values could not have the same name as a Map method. This is because the code was naively checking for the existence of a possible title field by simply accessing the raw value of the Map. This resulted in Map.prototype.set being returned when the "set" JSON key name was used. The logic has been updated to check for header titles against an Object.keys list now since that will not include prototype methods for the underlying Map object. Fixes #185
Thanks for reporting this @jgutix! I found the issue and have a pull request open for the fix. I'm going to see if I can push a release out later today with this and hopefully a fix for another issue that was reported. I'll comment with the version number once it goes out. |
mrodrig
added a commit
that referenced
this issue
May 20, 2021
* Validate field titles against Object.keys list As reported in #185, there was a bug where header values could not have the same name as a Map method. This is because the code was naively checking for the existence of a possible title field by simply accessing the raw value of the Map. This resulted in Map.prototype.set being returned when the "set" JSON key name was used. The logic has been updated to check for header titles against an Object.keys list now since that will not include prototype methods for the underlying Map object. Fixes #185 * Add test for #185. * Add Node 16, remove Node 10 for travis test cfg.
Thanks again @jgutix. I just released the fix in version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background Information
3.11.1
14
The issue I'm reporting is with:
I have...
Expected Behavior
Should allow field name/attribute to be name "set"
Actual Behavior
Will throw error:
TypeError: fieldValue.includes is not a function
Data Sample
CSV:
(or)
JSON:
Code Example
The text was updated successfully, but these errors were encountered: