Skip to content

Commit 046e740

Browse files
author
Vitalii Kulyk
committed
fix: add optional chaining to prevent errors when accessing actions in ListView
1 parent dde3b4f commit 046e740

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adminforth/spa/src/views/ListView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
</div>
9494
<div
9595
v-if="checkboxes.length"
96-
v-for="(action,i) in coreStore.resource?.options?.actions.filter(a => a.showIn?.bulkButton)"
96+
v-for="(action,i) in coreStore.resource?.options?.actions?.filter(a => a.showIn?.bulkButton)"
9797
>
9898
<button
9999
:key="action.id"
@@ -337,7 +337,7 @@ async function startBulkActionInner(actionId: string) {
337337
}
338338
339339
async function startCustomBulkActionInner(actionId: string | number) {
340-
const action = coreStore.resource?.options?.actions.find(a => a.id === actionId);
340+
const action = coreStore.resource?.options?.actions?.find(a => a.id === actionId);
341341
342342
await executeCustomBulkAction({
343343
actionId,

0 commit comments

Comments
 (0)