From 104679ca6e41604eaabcb561be8314360e62e64b Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 19 Oct 2021 20:22:56 -0400 Subject: [PATCH] Guard against record being `undefined`. Fix error `Cannot read properties of undefined (reading 'id')` --- ui/src/artist/ArtistList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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