Skip to content

Commit

Permalink
chore(www): fix redundant boolean condition (#13467)
Browse files Browse the repository at this point in the history
Passing identical, or seemingly identical, operands to an operator such as subtraction or conjunction may indicate a typo; even if it is intentional, it makes the code hard to read.

Many arithmetic or logical operators yield a trivial result when applied to identical operands: for instance, x-x yields zero if x is a number, and yields NaN otherwise; x&&x is always equal to x. Code like this is often the result of a typo, such as misspelling a variable name. Even if it is intentional (relying, for instance, on side effects), such code is hard to read and understand and should be avoided.
  • Loading branch information
Matheus Rocha Vieira authored and DSchau committed Apr 18, 2019
1 parent c3427e2 commit 15b3a4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/src/utils/sidebar/create-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const createLink = ({
isDraft && styles.draft,
isActive && styles.activeLink,
isParentOfActiveItem && styles.parentOfActiveLink,
customCSS && customCSS,
customCSS,
{ paddingLeft: indent },
{
"&:before, &:after": {
Expand Down

0 comments on commit 15b3a4b

Please sign in to comment.