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.
This commit is contained in:
Eric 2025-04-09 13:57:21 -05:00 committed by GitHub
parent 2ab6e7aa6a
commit 6e70d44c61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {