From 42081eb10574b12ee618992da24bb8249a011c5d Mon Sep 17 00:00:00 2001 From: Dennis Benz Date: Mon, 29 Jul 2024 10:20:48 +0200 Subject: [PATCH] Add optional chaining to acl Co-authored-by: Lars Kiesow --- src/slices/eventDetailsSlice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slices/eventDetailsSlice.ts b/src/slices/eventDetailsSlice.ts index 5175ea11c3..e8dfb3af44 100644 --- a/src/slices/eventDetailsSlice.ts +++ b/src/slices/eventDetailsSlice.ts @@ -860,7 +860,7 @@ export const fetchAccessPolicies = createAppAsyncThunk('eventDetails/fetchAccess return policies; } - const json = JSON.parse(accessPolicies.episode_access.acl).acl.ace; + const json = JSON.parse(accessPolicies.episode_access.acl).acl?.ace; if (json === undefined) { return policies; }