Skip to content

Commit 6ffb08e

Browse files
authoredFeb 5, 2024
Merge pull request #9636 from marmelab/fix-deletewithconfirmbutton
Fix DeleteWithConfirmButton raises an error when the record is not loaded
2 parents 4b825a0 + 43181b2 commit 6ffb08e

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)
Please sign in to comment.