Skip to content

Commit

Permalink
Admin: fix survey response view for staging
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannaPeanut committed Oct 30, 2024
1 parent 619f246 commit a123d36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/admin/surveys/[surveyId]/responses/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export default async function AdminSurveyResponsesPage({
{question?.component === "multipleResponse" &&
// @ts-expect-error
question?.props?.responses
// we only add this condition for staging; in production the array is never empty
// @ts-expect-error
.filter((r) => answerIds.includes(r.id))
.filter((r) => !!answerIds.length && answerIds.includes(r.id))
// @ts-expect-error
.map((r) => r.text.de + ", ")}
</p>
Expand Down

0 comments on commit a123d36

Please sign in to comment.