From 394ca249977b3b5699cd394f49ee76f3def33588 Mon Sep 17 00:00:00 2001 From: Elsa Date: Wed, 13 Dec 2023 10:54:26 -0500 Subject: [PATCH] Move localId check, check for both localIds --- src/calculation/ClauseResultsHelpers.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/calculation/ClauseResultsHelpers.ts b/src/calculation/ClauseResultsHelpers.ts index 6409e097..0af4af3d 100644 --- a/src/calculation/ClauseResultsHelpers.ts +++ b/src/calculation/ClauseResultsHelpers.ts @@ -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') { emptyResultClauses.push({ lib: libraryName, aliasLocalId: statement.operand.localId,