mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
Fix null imageUrl on credential
This commit is contained in:
@@ -116,14 +116,14 @@ export const AlbumListRoute = () => {
|
||||
|
||||
// * Adds server token
|
||||
if (isImageTokenRequired) {
|
||||
const t = albums.data.map((album) => {
|
||||
const data = albums.data.map((album) => {
|
||||
return {
|
||||
...album,
|
||||
imageUrl: album?.imageUrl + serverToken!,
|
||||
imageUrl: album.imageUrl && album.imageUrl + serverToken!,
|
||||
};
|
||||
});
|
||||
|
||||
return { ...albums, data: t };
|
||||
return { ...albums, data };
|
||||
}
|
||||
|
||||
return albums;
|
||||
|
||||
@@ -50,9 +50,10 @@ export const usePlayQueueHandler = () => {
|
||||
songs = songs.map((song) => {
|
||||
return {
|
||||
...song,
|
||||
imageUrl: isImageTokenRequired
|
||||
? `${song.imageUrl}${serverToken}`
|
||||
: song.imageUrl,
|
||||
imageUrl:
|
||||
song.imageUrl && isImageTokenRequired
|
||||
? `${song.imageUrl}${serverToken}`
|
||||
: song.imageUrl,
|
||||
streamUrl: `${song.streamUrl}${serverToken}`,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user