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,
})
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 @@
<Table
on:click={({ detail }) => viewDetails(detail)}
{customRenderers}
data={$auditLogs.logs.data}
data={$auditLogs.logs?.data}
allowEditColumns={false}
allowEditRows={false}
allowSelectRows={false}