{BUGFIX} On album update when no day is set for released field
This commit is contained in:
parent
abcbd0f8f7
commit
2eb22bb3d6
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue