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

Return null when elementName is falsey #3

Closed
captivationsoftware opened this issue Apr 26, 2015 · 1 comment
Closed

Return null when elementName is falsey #3

captivationsoftware opened this issue Apr 26, 2015 · 1 comment
Labels

Comments

@captivationsoftware
Copy link

First off, great lib - thanks for making it!

I think this lib could be better if it simply ommitted inputs when the elementName is null or empty. As it is today, it will raise an exception and kill the entire form scraping process.

Some possible solutions: getNamedFormElementData() could be made to return null instead of throwing an error when elementName is falsey, OR getFormData() could skip the call to getNamedFormElementData() whenever the current iteration's elementName is falsey.

@insin insin added the bug label Apr 27, 2015
@insin insin closed this as completed in 0c33f58 Apr 27, 2015
@insin
Copy link
Owner

insin commented Apr 27, 2015

Thanks for the report - v1.2.2 skips falsy values in getFormData() and doesn't throw if an empty string is passed to getNamedFormElementData()

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

1 participant