diff --git a/nextjs-app/components/SecondarySchoolDetailView.tsx b/nextjs-app/components/SecondarySchoolDetailView.tsx index 00e124a..624b128 100644 --- a/nextjs-app/components/SecondarySchoolDetailView.tsx +++ b/nextjs-app/components/SecondarySchoolDetailView.tsx @@ -215,9 +215,9 @@ export function SecondarySchoolDetailView({ )} - {latestResults?.total_pupils != null && ( + {(schoolInfo.total_pupils != null || latestResults?.total_pupils != null) && ( - Pupils: {latestResults.total_pupils.toLocaleString()} + Pupils: {(schoolInfo.total_pupils ?? latestResults!.total_pupils!).toLocaleString()} {schoolInfo.capacity != null && ` (capacity: ${schoolInfo.capacity})`} )} @@ -716,10 +716,10 @@ export function SecondarySchoolDetailView({