Skip to content

🎧 Your Personal Streaming Service

Guard against record being `undefined`. Fix error `Cannot read properties of undefined (reading 'id')`

Deluan104679ca6e41
diff --git a/ui/src/artist/ArtistList.js b/ui/src/artist/ArtistList.js
index e8bda4d3f..82eeb8992 100644
--- a/ui/src/artist/ArtistList.js
+++ b/ui/src/artist/ArtistList.js
@@ -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} />