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

Fix array checking in getQuerySelector() #23

Merged
merged 1 commit into from
Dec 23, 2016
Merged

Fix array checking in getQuerySelector() #23

merged 1 commit into from
Dec 23, 2016

Conversation

kasperisager
Copy link
Contributor

First off, massive kudos for your work on this library! I did find a rather sneaky bug outlined below.

Property existance checking is insufficient for determining the type of a variable and actually led to a bug in this case: <select> elements have a length property denoting the number of contained <option> elements; optimal-select would treat this element as an array, causing it to fail.

Property existance checking is insufficient for determining the type of
a variable and actually led to a bug in this case: `<select>` elements
have a `length` property denoting the number of contained `<option>`
elements; `optimal-select` would treat this element as an array, causing
it to fail.
@autarc
Copy link
Owner

autarc commented Dec 23, 2016

Thanks for your help. Will also check for the next release if there are other cases which are not covered yet.

@autarc autarc merged commit 211c826 into autarc:master Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants