diff --git a/eq-author/src/utils/getContentBeforeEntity.js b/eq-author/src/utils/getContentBeforeEntity.js index f623ed053b..167b59097e 100644 --- a/eq-author/src/utils/getContentBeforeEntity.js +++ b/eq-author/src/utils/getContentBeforeEntity.js @@ -43,9 +43,9 @@ const getContentBeforeEntity = ( return sections; } - let answers = - !isListCollectorPageType(page.pageType) && - (page?.answers?.flatMap(preprocessAnswers) || []); + let answers = !isListCollectorPageType(page.pageType) + ? page?.answers?.flatMap(preprocessAnswers) || [] + : []; /* When expression group's condition is "And":