Skip to content

Commit

Permalink
Handle case where there is no input through the conditional access
Browse files Browse the repository at this point in the history
  • Loading branch information
shankari committed May 5, 2024
1 parent 79656d8 commit ed61b8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions www/js/survey/multilabel/confirmHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ export function getLabelInputDetails(appConfigParam?) {
export function labelInputDetailsForTrip(userInputForTrip, appConfigParam?) {
if (appConfigParam) appConfig = appConfigParam;
if (appConfig.intro.mode_studied) {
if (userInputForTrip?.['MODE']?.data.label == appConfig.intro.mode_studied) {
logDebug(`Found trip labeled with ${userInputForTrip?.['MODE']?.data.label}, mode of study = ${appConfig.intro.mode_studied}.
if (userInputForTrip?.['MODE']?.data?.label == appConfig.intro.mode_studied) {
logDebug(`Found trip labeled with ${userInputForTrip?.['MODE']?.data?.label}, mode of study = ${appConfig.intro.mode_studied}.
Needs REPLACED_MODE`);
return getLabelInputDetails();
} else {
logDebug(`Found trip labeled with ${userInputForTrip?.['MODE']?.data.label}, not labeled with mode of study = ${appConfig.intro.mode_studied}.
logDebug(`Found trip labeled with ${userInputForTrip?.['MODE']?.data?.label}, not labeled with mode of study = ${appConfig.intro.mode_studied}.
Doesn't need REPLACED_MODE`);
return baseLabelInputDetails;
}
Expand Down

0 comments on commit ed61b8d

Please sign in to comment.