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

Excess code: the option just setted to 'false' value. No reason to check later that it does not equal true #43

Open
KES777 opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@KES777
Copy link

KES777 commented Jan 8, 2025

Describe the bug
image

The value on (1) line is set to false it is guaranteed that on line (2) it is !== true.

Further more if was selected and its value equals to the newValue, this code will issue fake change event, because nothing was changed actually.

To Reproduce
This is not tested. I just tried to read the code visually.

  1. Create select with option and value 7.
  2. Try to set value 7 to the select component.
@KES777 KES777 added the bug Something isn't working label Jan 8, 2025
@KES777 KES777 changed the title Excess code: the option just setted to 'false' value. To reason to check that it does not equal true Excess code: the option just setted to 'false' value. No reason to check later that it does not equal true Jan 8, 2025
@brainfoolong
Copy link
Owner

Hi. Thanks. That is a nice catch, i will look into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants