From d178b3d8c7066ad7c73cf62eb70ad4c611afa3d3 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 24 Jun 2024 10:36:05 +0930 Subject: [PATCH] Fix js error can't find linkId --- .../utils/removeEmptyAnswers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdc-populate/src/SDCPopulateQuestionnaireOperation/utils/removeEmptyAnswers.ts b/packages/sdc-populate/src/SDCPopulateQuestionnaireOperation/utils/removeEmptyAnswers.ts index 796e59b4c..ac7900a1b 100644 --- a/packages/sdc-populate/src/SDCPopulateQuestionnaireOperation/utils/removeEmptyAnswers.ts +++ b/packages/sdc-populate/src/SDCPopulateQuestionnaireOperation/utils/removeEmptyAnswers.ts @@ -75,7 +75,7 @@ function removeEmptyAnswersFromItemRecursive( const childQrItem = qrItems[qrItemIndex]; // Save qrItem if linkIds of current qItem and qrItem are the same - if (childQItem && childQrItem && childQItem.linkId === childQrItem.linkId) { + if (childQItem && childQrItem && childQItem?.linkId === childQrItem?.linkId) { // if (!qItems[qrItemIndex]) { // continue; // }