Skip to content

Commit

Permalink
Move localId check, check for both localIds
Browse files Browse the repository at this point in the history
  • Loading branch information
elsaperelli committed Dec 13, 2023
1 parent 902695e commit 394ca24
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/calculation/ClauseResultsHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,8 @@ export function findAllLocalIdsInStatement(
// If this is a "Not" expression, we will want to check if it's operand type is 'Equivalent' or 'Equal'
// If so, we will want to treat this as a 'Not Equivalent' or 'Not Equal' expression which we can do so
// by mapping the 'Equal' or 'Equivalent' clause localId to that of the 'Not' clause
if (statement.operand) {
if (
statement.operand.type === 'Equivalent' ||
(statement.operand.type === 'Equal' && statement.operand.localId)
) {
if (statement.operand && statement.localId && statement.operand.localId) {
if (statement.operand.type === 'Equivalent' || statement.operand.type === 'Equal') {

Check warning on line 222 in src/calculation/ClauseResultsHelpers.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
emptyResultClauses.push({
lib: libraryName,
aliasLocalId: statement.operand.localId,
Expand Down

0 comments on commit 394ca24

Please sign in to comment.