We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When you initiate Dropkick on an empty select element it throws the error:
TypeError: Cannot read property 'text' of undefined.
<select id="emptysel"></select>
I traced it to line 826 and found that Dropkick doesn't check if sel.selectedIndex == -1.
The reason it's empty when I'm initializing Dropkick is because I'm using the reactivity of Meteor to populate the select.
The text was updated successfully, but these errors were encountered:
I fixed it with this:
"innerHTML": (sel.selectedIndex === -1) ? '' : sel.options[ sel.selectedIndex ].text,
But there might be a better way to do it.
Sorry, something went wrong.
Fix for no options. #244
8684f45
wwilsman
No branches or pull requests
When you initiate Dropkick on an empty select element it throws the error:
TypeError: Cannot read property 'text' of undefined.
I traced it to line 826 and found that Dropkick doesn't check if sel.selectedIndex == -1.
The reason it's empty when I'm initializing Dropkick is because I'm using the reactivity of Meteor to populate the select.
The text was updated successfully, but these errors were encountered: