The analyzer has detected an expression that can be simplified. Such expressions may also indicate logical errors.
The example:
let firstCond, secondCond, thirdCond;
....
if (firstCond || (firstCond && thirdCond))
....
The expression is redundant. If firstCond is true, the condition result is always true, regardless of thirdCond. If firstCond is false, the expression is always false.
The firstCond || (firstCond && thirdCond) expression can be simplified as follows:
if (firstCond)
Most likely, a wrong variable was used in the second subexpression. The fixed code may look like this:
if (firstCond || (secondCond && thirdCond))
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: