Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updates responses to use "-" for no responses #893

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lambda-code/reliability/lib/dataLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ function handleArrayResponse(title: string, response: Response, collector: strin
return;
}
}
collector.push(`**${title}**${String.fromCharCode(13)}No response`);
// Note the below dash is an em_dash (longer dash). This is a work around for a lone dash being
// stripped out in an email. Same fore similar cases below.
collector.push(`**${title}**${String.fromCharCode(13)}—`);
}

function handleTextResponse(title: string, response: Response, collector: string[]) {
Expand All @@ -372,7 +374,7 @@ function handleTextResponse(title: string, response: Response, collector: string
return;
}

collector.push(`**${title}**${String.fromCharCode(13)}No Response`);
collector.push(`**${title}**${String.fromCharCode(13)}`);
}

function handleFileInputResponse(title: string, response: Response, collector: string[]) {
Expand All @@ -382,7 +384,7 @@ function handleFileInputResponse(title: string, response: Response, collector: s
return;
}

collector.push(`**${title}**${String.fromCharCode(13)}No Response`);
collector.push(`**${title}**${String.fromCharCode(13)}`);
}

function handleFormattedDateResponse(
Expand All @@ -401,7 +403,7 @@ function handleFormattedDateResponse(
return;
}

collector.push(`**${title}**${String.fromCharCode(13)}No Response`);
collector.push(`**${title}**${String.fromCharCode(13)}`);
}

function handleAddressCompleteResponse(title: string, response: Response, collector: string[], language: string, adddressComponents?: AddressCompleteProps) {
Expand All @@ -426,5 +428,5 @@ function handleAddressCompleteResponse(title: string, response: Response, collec
return;
}

collector.push(`**${title}**${String.fromCharCode(13)}No Response`);
}
collector.push(`**${title}**${String.fromCharCode(13)}`);
}