From 2d2f1d680682bb0be2c33b8a97b1d52a849cb14e Mon Sep 17 00:00:00 2001 From: casperiv0 <53900565+casperiv0@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:43:13 +0200 Subject: [PATCH] fix: add fallback --- apps/client/src/pages/courthouse.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/src/pages/courthouse.tsx b/apps/client/src/pages/courthouse.tsx index c905bd812..0279fa9ce 100644 --- a/apps/client/src/pages/courthouse.tsx +++ b/apps/client/src/pages/courthouse.tsx @@ -30,7 +30,7 @@ export default function Courthouse(props: Props) { const { hasPermissions } = usePermission(); const hasEntriesPerms = hasPermissions([Permissions.Leo]); const hasCourthouseAdminPerms = hasPermissions(defaultPermissions.defaultCourthousePermissions); - const enabledTypes = options.COURTHOUSE; + const enabledTypes = options.COURTHOUSE ?? []; const expungementRequestsEnabled = enabledTypes.includes(CourthouseType.EXPUNGEMENT_REQUEST); const nameChangeRequestsEnabled = enabledTypes.includes(CourthouseType.NAME_CHANGE_REQUEST);