Skip to content

Commit 43181b2

Browse files
committed
Fix DeleteWithConfirmButton raises an error when the record is not loaded
Closes #9630
1 parent b01aa1b commit 43181b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ra-ui-materialui/src/button/DeleteWithConfirmButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const DeleteWithConfirmButton = <RecordType extends RaRecord = any>(
8484
true
8585
),
8686
}),
87-
id: record.id,
87+
id: record?.id,
8888
...translateOptions,
8989
}}
9090
onConfirm={handleDelete}

0 commit comments

Comments
 (0)