From 3f5067ecc98fec414a4de0391a8f194119092a86 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 13 Dec 2024 09:12:08 +0000 Subject: [PATCH] Ensure audit log store properties are properly optional --- .../pages/builder/portal/account/auditLogs/index.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/account/auditLogs/index.svelte b/packages/builder/src/pages/builder/portal/account/auditLogs/index.svelte index 4759f8d8ce..d498c557b2 100644 --- a/packages/builder/src/pages/builder/portal/account/auditLogs/index.svelte +++ b/packages/builder/src/pages/builder/portal/account/auditLogs/index.svelte @@ -160,8 +160,8 @@ events: selectedEvents, }) logsPageInfo.fetched( - $auditLogs.logs.hasNextPage, - $auditLogs.logs.bookmark + $auditLogs.logs?.hasNextPage, + $auditLogs.logs?.bookmark ) } catch (error) { notifications.error(`Error getting audit logs - ${error}`) @@ -200,6 +200,8 @@ return Object.entries(obj).map(([id, label]) => { return { id, label } }) + } else { + return [] } } @@ -316,7 +318,7 @@ viewDetails(detail)} {customRenderers} - data={$auditLogs.logs.data} + data={$auditLogs.logs?.data} allowEditColumns={false} allowEditRows={false} allowSelectRows={false}