-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
HTML Select with "multiple" attribute leads to "Cannot read properties of undefined" #1365
Comments
Hi @HannesT117, Thank you for reporting this! For this plugin we also have puppeteer tests. postcss-plugins/plugins/css-blank-pseudo/test/_browser.html Lines 13 to 38 in c13f67d
|
Hi @romainmenke thanks for the info! I've extended the tests with a second select :) |
This has been released! Thank you again for reporting and fixing this issue 🙇 |
Cool, thank you for the very quick response! |
Reproduction link
No response
Bug description
In https://github.com/csstools/postcss-plugins/blob/main/plugins/css-blank-pseudo/src/browser.js#L52, the code assumes that
element.selectedIndex
is always the index of an element in the options array.When using a select field with attribute
multiple
, this index can be-1
though. This leads to anUncaught TypeError: Cannot read properties of undefined (reading 'value')
Minimal Example
Actual Behavior
No response
Expected Behavior
No response
Can you reproduce it with
npx @csstools/csstools-cli <plugin-name> minimal-example.css
?None
npx
OutputNo response
Extra config
No response
What plugin are you experiencing this issue on?
CSS Blank Pseudo
Plugin version
6.0.1
What OS are you experiencing this on?
No response
Node Version
18
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: