From 6e70d44c614bd88e869e7657a6b18b2b9934209d Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 9 Apr 2025 13:57:21 -0500 Subject: [PATCH] Website: update save-questionnaire-progress (#28045) Closes: https://github.com/fleetdm/confidential/issues/10240 Changes: - Updated `save-questionnaire-progress` to only check the answer to the `what-do-you-manage-mdm` step if the user actually answered that question. --- website/api/controllers/save-questionnaire-progress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/api/controllers/save-questionnaire-progress.js b/website/api/controllers/save-questionnaire-progress.js index 4e893897f2..b231c65957 100644 --- a/website/api/controllers/save-questionnaire-progress.js +++ b/website/api/controllers/save-questionnaire-progress.js @@ -160,7 +160,7 @@ module.exports = { if(currentSelectedBuyingSituation === 'mdm') { // Since the mdm use case question is the only buying situation-specific question where a use case can't // be selected, we'll check the user's previous answers before changing their psyStage - if(questionnaireProgress['what-do-you-manage-mdm'].mdmUseCase === 'no-use-case-yet'){ + if(typeof questionnaireProgress['what-do-you-manage-mdm'] !== 'undefined' && questionnaireProgress['what-do-you-manage-mdm'].mdmUseCase === 'no-use-case-yet'){ // Check the user's answer to the have-you-ever-used-fleet question. psychologicalStage = '3 - Intrigued'; } else {