1
Fork 0

Fix sidebar album path reversed

This commit is contained in:
viktorstrate 2022-02-08 13:22:23 +01:00
parent 793e868d6f
commit a43f29ee6d
No known key found for this signature in database
GPG Key ID: 3F855605109C1E8A
1 changed files with 5 additions and 1 deletions

View File

@ -180,7 +180,11 @@ const SidebarContent = ({ media, hidePreview }: SidebarContentProps) => {
let albumPath = null
const mediaAlbum = media.album
if (!isNil(mediaAlbum)) {
const pathElms = [...(mediaAlbum.path ?? []), mediaAlbum].map(album => (
console.log('PATH reversed', mediaAlbum.path ?? [])
const pathElms = [
...[...(mediaAlbum.path ?? [])].reverse(),
mediaAlbum,
].map(album => (
<li key={album.id} className="inline-block hover:underline">
<Link
className="text-blue-900 hover:underline"