Ensure audit log store properties are properly optional

This commit is contained in:
Andrew Kingston 2024-12-13 09:12:08 +00:00
parent 1529eecc68
commit 3f5067ecc9
No known key found for this signature in database
1 changed files with 5 additions and 3 deletions

View File

@ -160,8 +160,8 @@
events: selectedEvents, events: selectedEvents,
}) })
logsPageInfo.fetched( logsPageInfo.fetched(
$auditLogs.logs.hasNextPage, $auditLogs.logs?.hasNextPage,
$auditLogs.logs.bookmark $auditLogs.logs?.bookmark
) )
} catch (error) { } catch (error) {
notifications.error(`Error getting audit logs - ${error}`) notifications.error(`Error getting audit logs - ${error}`)
@ -200,6 +200,8 @@
return Object.entries(obj).map(([id, label]) => { return Object.entries(obj).map(([id, label]) => {
return { id, label } return { id, label }
}) })
} else {
return []
} }
} }
@ -316,7 +318,7 @@
<Table <Table
on:click={({ detail }) => viewDetails(detail)} on:click={({ detail }) => viewDetails(detail)}
{customRenderers} {customRenderers}
data={$auditLogs.logs.data} data={$auditLogs.logs?.data}
allowEditColumns={false} allowEditColumns={false}
allowEditRows={false} allowEditRows={false}
allowSelectRows={false} allowSelectRows={false}