Guard against record being `undefined`. Fix error `Cannot read properties of undefined (reading 'id')`
This commit is contained in:
parent
5621551dd0
commit
104679ca6e
|
@ -86,7 +86,7 @@ const ArtistDatagridRow = (props) => {
|
|||
const { record } = props
|
||||
const [, dragArtistRef] = useDrag(() => ({
|
||||
type: DraggableTypes.ARTIST,
|
||||
item: { artistIds: [record.id] },
|
||||
item: { artistIds: [record?.id] },
|
||||
options: { dropEffect: 'copy' },
|
||||
}))
|
||||
return <DatagridRow ref={dragArtistRef} {...props} />
|
||||
|
|
Loading…
Reference in New Issue