mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-07 02:43:17 +03:00
Guard against record being undefined
. Fix error Cannot read properties of undefined (reading 'albumId')
This commit is contained in:
parent
1d742cf8c7
commit
b7fedddfd8
@ -109,14 +109,14 @@ export const SongDatagridRow = ({
|
|||||||
const [, dragDiscRef] = useDrag(() => ({
|
const [, dragDiscRef] = useDrag(() => ({
|
||||||
type: DraggableTypes.DISC,
|
type: DraggableTypes.DISC,
|
||||||
item: {
|
item: {
|
||||||
discs: [{ albumId: record.albumId, discNumber: record.discNumber }],
|
discs: [{ albumId: record?.albumId, discNumber: record?.discNumber }],
|
||||||
},
|
},
|
||||||
options: { dropEffect: 'copy' },
|
options: { dropEffect: 'copy' },
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const [, dragSongRef] = useDrag(() => ({
|
const [, dragSongRef] = useDrag(() => ({
|
||||||
type: DraggableTypes.SONG,
|
type: DraggableTypes.SONG,
|
||||||
item: { ids: [record.id] },
|
item: { ids: [record?.id] },
|
||||||
options: { dropEffect: 'copy' },
|
options: { dropEffect: 'copy' },
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user