Skip to content

Remove duplicate length check from expression.genCSS() #4327

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Krinkle
Copy link

@Krinkle Krinkle commented Mar 21, 2025

What:

Remove redundant code.

Credit to @anny21 who found this at https://gerrit.wikimedia.org/r/1129964, wikimedia/less.php@bed2c0c.

Why:

Follows-up 53f84f0, which added the conditional with a check for i + 1 < this.value.length, which is duplicated from the parent conditional that guruantees the same already with nothing in-between for it to change.

As redundancy, this is inefficient, and its presence could also be confusing to future maintainers.

Checklist:

  • Documentation, N/A
  • Added/updated unit tests, N/A
  • Code complete

Follows-up 53f84f0, which started the conditional
with a check for `i + 1 < this.value.length`, which is the same
as the parent block.
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant