Website: Fix assertion error in save-questionnaire-progress (#18818)

Related to: https://github.com/fleetdm/fleet/issues/18817

Changes:
- Updated a conditional statement in save-questionnaire-progress to
check the correct variable for a user's previous answer to the "Have you
ever used Fleet?" question
This commit is contained in:
Eric 2024-05-07 16:46:00 -05:00 committed by GitHub
parent 15ab9a4ed8
commit 6e1bb1b85b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -192,7 +192,7 @@ module.exports = {
} else if(currentStep === 'how-many-hosts') {
if(['yes-deployed'].includes(hasUsedFleetAnswer)) {
psychologicalStage = '6 - Has team buy-in';
} else if(valueFromFormData === 'yes-recently-deployed'){
} else if(['yes-recently-deployed'].includes(hasUsedFleetAnswer)){
psychologicalStage = '5 - Personally confident';
} else {
// IWMIH then we want Fleet to host for us (either because we wanted that from the get-go, or we backtracked because deploying looked too time-consuming)
@ -201,7 +201,7 @@ module.exports = {
} else if(currentStep === 'will-you-be-self-hosting') {
if(['yes-deployed'].includes(hasUsedFleetAnswer)) {
psychologicalStage = '6 - Has team buy-in';
} else if(valueFromFormData === 'yes-recently-deployed'){
} else if(['yes-recently-deployed'].includes(hasUsedFleetAnswer)){
psychologicalStage = '5 - Personally confident';
} else { require('assert')(false, 'This should never happen.'); }
}//fi