{BUGFIX} On album update when no day is set for released field

This commit is contained in:
Damien Broqua 2024-01-18 08:28:25 +01:00
parent abcbd0f8f7
commit 2eb22bb3d6

View file

@ -33,6 +33,11 @@ export const getAlbumDetails = async (id) => {
const res = await dis.getRelease(id);
if (res.released.includes("-00")) {
const [year, month] = res.released.split("-");
res.released = new Date(year, parseInt(month, 10) - 1);
}
return res;
};